Title and description, not the ones setted with YOAST SEO

Home Forums Calendar Products Events Calendar PRO Title and description, not the ones setted with YOAST SEO

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #968056
    Mandarina
    Participant

    Hello,

    My events page is not respecting the title and description that I defined in the YOAST configuration for the page.

    that’s the only page that won’t output what I setted there

    Any one faced this problem?

    #968291
    Brian
    Keymaster

    Hi,

    Sorry for the issues.

    I maybe to help, but I am limited in supporting 3rd party plugins.

    If you change the event template does that help?

    Head to this page:

    Events > Settings > Display Tab

    Then change this setting:

    Events Template to Default Page Template

    Let me know if that helps.

    Thanks

    #968362
    Mandarina
    Participant

    Hi,

    thank your for your answer allthough the problem persists if I update the template…

    Any more thoughts?

    #968368
    Mandarina
    Participant

    Hi,

    I get it working for the title, like this

    add_filter(‘wpseo_title’,’ql_seo_custom_titles’, 10, 1 );
    function ql_seo_custom_titles( $title ) {
    $tribe_ecp = TribeEvents::instance();
    $opt = get_wpseo_options(); // get wpseo_options ##
    $ql_title_sep = ( isset( $opt[‘breadcrumbs-sep’] ) && $opt[‘breadcrumbs-sep’] != ” ) ? $opt[‘breadcrumbs-sep’] : ‘ • ‘;
    $paginas = array(
    ‘es’ => 898,
    ‘en’ => 1008,
    ‘de’ => 1009
    );
    if ( is_event() ) { // re-filter titles ##

    if( tribe_is_month() && !is_tax() ) { // The Main Calendar Page
    $pagina_id = $paginas[ICL_LANGUAGE_CODE];
    $event_title = get_post_meta( $pagina_id , ‘_yoast_wpseo_title’, true);
    } elseif( tribe_is_month() && is_tax() ) { // Category Calendar Pages
    $cat = get_term_by( ‘slug’, get_query_var(‘term’), $tribe_ecp->get_event_taxonomy() );
    $event_title = ”.$cat.’ Calendar’;
    } elseif( tribe_is_event() && is_tax() ) { // Calendar Category Pages
    if ( is_tax( $tribe_ecp->get_event_taxonomy() ) ) {
    $event_title = ”.ql_get_events_cat();
    } else { // tax list – return wpseo title as is – for custom taxonomy “tribe_events_tag” added to tribe_event cpt ##
    $event_title = ”.$title;
    }
    } elseif( tribe_is_event() && is_single() ) { // Single Events – so get post title ##
    $event_title = ”.get_the_title();
    } elseif( tribe_is_day() ) { // Single Event Days
    $event_title = ‘Upcoming Events’;
    #} elseif( tribe_is_venue() ) { // Single Venues
    #} elseif ( tribe_is_past() ) { // past event ##
    } else {
    //$event_title = ‘Events’;
    $pagina_id = $paginas[ICL_LANGUAGE_CODE];
    $event_title = get_post_meta( get_the_ID() , ‘_yoast_wpseo_title’, true);
    }

    // add site title to the end ##
    $title = $event_title.’ ‘.$ql_title_sep.’ ‘.get_bloginfo( ‘name’ );

    } else { // not events, so don’t change SEO title ##
    $title = ”.$title;
    }

    return $title;
    }
    add_filter(‘wpseo_wpseo_metadesc’,’ql_seo_custom_wpseo_metadesc’, 10, 1 );

    but I tried to Do the same for the description, like this: but it’s not ouputing the tag…

    add_filter(‘wpseo_wpseo_metadesc’,’ql_seo_custom_wpseo_metadesc’, 10, 1 );
    function ql_seo_custom_description ( $wpseo_metadesc ) {
    $tribe_ecp = TribeEvents::instance();
    $opt = get_wpseo_options(); // get wpseo_options ##
    $ql_title_sep = ( isset( $opt[‘breadcrumbs-sep’] ) && $opt[‘breadcrumbs-sep’] != ” ) ? $opt[‘breadcrumbs-sep’] : ‘ • ‘;
    $paginas = array(
    ‘es’ => 898,
    ‘en’ => 1008,
    ‘de’ => 1009
    );
    if ( is_event() ) { // re-filter titles ##

    if( tribe_is_month() && !is_tax() ) { // The Main Calendar Page
    $pagina_id = $paginas[ICL_LANGUAGE_CODE];
    $event_title = get_post_meta( $pagina_id , ‘_yoast_wpseo_metadesc’, true);
    } elseif( tribe_is_month() && is_tax() ) { // Category Calendar Pages
    $cat = get_term_by( ‘slug’, get_query_var(‘term’), $tribe_ecp->get_event_taxonomy() );
    $event_title = ”.$cat.’ Calendar’;
    } elseif( tribe_is_event() && is_tax() ) { // Calendar Category Pages
    if ( is_tax( $tribe_ecp->get_event_taxonomy() ) ) {
    $event_title = ”.ql_get_events_cat();
    } else { // tax list – return wpseo title as is – for custom taxonomy “tribe_events_tag” added to tribe_event cpt ##
    $event_title = ”.$wpseo_metadesc;
    }
    } elseif( tribe_is_event() && is_single() ) { // Single Events – so get post title ##
    $event_title = ”.get_the_title();
    } elseif( tribe_is_day() ) { // Single Event Days
    $event_title = ‘Upcoming Events’;
    #} elseif( tribe_is_venue() ) { // Single Venues
    #} elseif ( tribe_is_past() ) { // past event ##
    } else {
    //$event_title = ‘Events’;
    $pagina_id = $paginas[ICL_LANGUAGE_CODE];
    $event_title = get_post_meta( get_the_ID() , ‘_yoast_wpseo_metadesc’, true);
    }

    // add site title to the end ##
    $title = $event_title.’ ‘.$ql_title_sep.’ ‘.get_bloginfo( ‘name’ );

    } else { // not events, so don’t change SEO title ##
    $title = ”.$wpseo_metadesc;
    }

    return $title;
    }

    Any thoughts?

    #968407
    Brian
    Keymaster

    So is that coding working for you?

    That might be the only way to get the Event Views to show the titles.

    The Event Views are archives in WordPress and that is usually where the compatibility issues come from as everyone is usually just dealing with pages.

    #968409
    Mandarina
    Participant

    Hi brian,

    Thanks for your answer,

    As I said, the title code works for me, yes!

    the problem is with the second one, I believe there’s something wrong, because the <meta name=”description”> is not in the html…

    Any thoughts?

    #968482
    Brian
    Keymaster

    Ok so the second filter is not working.

    Can you verify this is the correct filter:

    wpseo_wpseo_metadesc

    Also can you get it to show anything? Even just a word?

    #968484
    Mandarina
    Participant

    According to their official documentation, is that

    https://yoast.com/wordpress/plugins/seo/api/

    Do you think it isn’t?

    Thanks again!

    #968485
    Brian
    Keymaster

    Oh I see what we are doing.

    The filter is wpseo_metadesc

    But it is wpseo_wpseo_metadesc in the coding above.

    See if changing that helps.

    #968711
    Mandarina
    Participant

    Yes, that was it! thank you!!

    #968736
    Brian
    Keymaster

    Great glad it helps.

    I am going to close this ticket, but if you need anything else related to this topic or another please post a new topic on the forum and we can help you out.

    Thanks

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Title and description, not the ones setted with YOAST SEO’ is closed to new replies.