• Resolved yrzhn

    (@yrzhn)


    <?php
    function filter_events_title( $title ) {
      if( tribe_context()->get( 'view_request' ) === 'default' ) {
        $title = 'Single event page';
      } elseif( tribe_context()->get( 'view_request' ) === 'list' ) {
        $title = 'Single event page';
      } elseif( tribe_context()->get( 'view_request' ) === 'month') {
        $title = 'Month event page';
      } elseif( tribe_context()->get( 'view_request' ) === 'day' ) {
        $title = 'Day event page';
      } elseif( tribe_context()->get( 'view_request' ) === 'summary' ) {
        $title = 'Summary event page';
      } elseif( tribe_context()->get( 'view_request' ) === 'photo' ) {
        $title = 'Photo event page';
      } elseif( tribe_context()->get( 'view_request' ) === 'map' ) {
        $title = 'Map event page';
      }
      return $title;
    }
    add_filter( 'tribe_events_title_tag', 'filter_events_title' );

    Hello!

    I added this code from your knowledge base in functions.php of the child theme and it worked only for the first condition (‘default’), I put the same $title everywhere but it seems to need an update as in list view it changes again to “Upcoming Events” and is different in Month and Day views too (“Events for [Month]”, “Events for [Day]”), basically no other condition of this function changes the meta title. Could you tell me how to make it work please?

    Best regards!

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hi @yrzhn

    Glad you reached out. And thanks for reporting this.

    I wonder if it might be affected by the default view you can select in Events > Settings > Display. Its usually set to List. And looking at the code, default and list are set to the same title.

    Let me check on the expected behavior for this code.

    We’ll reach back out once there’s any news.

    Thanks for your patience.

    Best,
    Rob

    Thread Starter yrzhn

    (@yrzhn)

    Thanks, I’ll be waiting for a response. I have written the name of the page in all $title because I do not want it to change ??

    Plugin Support Darian

    (@d0153)

    Hi @yrzhn

    If you have SEO plugins like Yoast SEO, you can update the meta title and description of your Event Archive from there.

    See- https://share.getcloudapp.com/v1uW5Yre

    I hope this helps, and please let me know if you have further questions or concerns.

    Thread Starter yrzhn

    (@yrzhn)

    Thanks for the video, I was wondering about how to set this up in Yoast SEO but I saved these settings and titles are still changing when I click List / Month / Day (tried to check that from incognito mode, but same).

    https://snipboard.io/louwGc.jpg

    Plugin Support Darian

    (@d0153)

    Hi @yrzhn

    Please remove the snippet code you mentioned here and check if that helps.

    If you need further assistance, please open a Support Ticket on our Help Desk. This is to follow WordPress Forum Guidelines regarding premium users.

    You’ll hear from one of my colleagues soon!

    Thread Starter yrzhn

    (@yrzhn)

    No, it didn’t help (I commented out the snippet code and my settings for Yoast remained unchanged after I followed the video), so I will bring back the code (at least it worked in the first condition). Maybe @robelemental will find the fix.

    Recently I also understood that the fix works (when you open any view for the first time with a link or refresh the page) but when you click the link it switches to default.

    Plugin Support Darian

    (@d0153)

    Hi @yrzhn

    Thanks for your message. Unfortunately, we cannot provide further support in this forum for premium users.

    For us to help you better, please open a Support Ticket on our Help Desk.

    You’ll hear from one of my colleagues soon!

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Good reply.

    @robelemental The developers can’t help customers here, they would risk getting into trouble with this site if they did.

    For pro or commercial product support please contact the developer directly on their site. This includes any pre-sales topics as well.

    https://theeventscalendar.com/support/#contact

    As the developer is aware, commercial products are not supported in these forums. I am sure they will have no problem supporting you there.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    NUTS. I meant @yrzhn for that reply and not @robelemental ??

    Plugin Support Darian

    (@d0153)

    Hi @yrzhn

    We’ll go ahead and mark this thread as Resolved. Please open a?Support Ticket?on our Help Desk if any other questions arise, and we’d be happy to help.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Change the Meta Title for Calendar Views’ is closed to new replies.