Home › Forums › Calendar Products › Events Calendar PRO › Title and description, not the ones setted with YOAST SEO
- This topic has 10 replies, 2 voices, and was last updated 8 years, 9 months ago by Brian.
-
AuthorPosts
-
June 9, 2015 at 2:19 am #968056MandarinaParticipant
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?
June 9, 2015 at 5:37 pm #968291BrianKeymasterHi,
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
June 10, 2015 at 12:51 am #968362MandarinaParticipantHi,
thank your for your answer allthough the problem persists if I update the template…
Any more thoughts?
June 10, 2015 at 2:17 am #968368MandarinaParticipantHi,
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?
June 10, 2015 at 6:51 am #968407BrianKeymasterSo 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.
June 10, 2015 at 6:53 am #968409MandarinaParticipantHi 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?
June 10, 2015 at 9:06 am #968482BrianKeymasterOk 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?
June 10, 2015 at 9:08 am #968484MandarinaParticipantAccording to their official documentation, is that
https://yoast.com/wordpress/plugins/seo/api/
Do you think it isn’t?
Thanks again!
June 10, 2015 at 9:12 am #968485BrianKeymasterOh 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.
June 11, 2015 at 1:11 am #968711MandarinaParticipantYes, that was it! thank you!!
June 11, 2015 at 5:51 am #968736BrianKeymasterGreat 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
-
AuthorPosts
- The topic ‘Title and description, not the ones setted with YOAST SEO’ is closed to new replies.