Hi imbrox, thanks for opening this support topic! 🙂
Suggestion – Forum archives title:
To give your forum a more clean title, I’d suggest going to the SEO Settings Page. Within the Title Settings metabox, you can find “Prefixes” (third tab).
Select the option within there, so your title will change, as per example below:
From: Archivos: Foros | GamElegant
To: Foros | GamElegant
Resolution – Incorrect title on topics:
About the topics having the incorrect title, I believe your theme is built around bbPress? It’s rather beautiful :). I unfortunately believe this is the cause for that the topics take their root forum’s name as the title.
To resolve this, I believe this snippet should help:
add_action( 'template_redirect', 'my_the_seo_framework_id_overwrite' );
/**
* Changes the ID The SEO Framework handles in the current loop.
* @action template_redirect We need the query variable post_type.
*/
function my_the_seo_framework_id_overwrite() {
if ( is_admin() )
return;
if ( 'topic' === get_post_type() && function_exists( 'bbp_get_topic_id' ) )
add_filter( 'the_seo_framework_current_object_id', 'bbp_get_topic_id' );
}
If that doesn’t work, we can use this snippet instead:
add_action( 'template_redirect', 'my_bbpress_title_overwrite' );
/**
* Changes bbPress topic title. Does nothing in admin.
* @action template_redirect We need the query variable post_type.
*/
function my_bbpress_title_overwrite() {
if ( is_admin() )
return;
if ( 'topic' === get_post_type() ) {
//* The SEO Framework Filter.
add_filter( 'the_seo_framework_pre_add_title', 'get_my_bbpress_title_overwrite' );
//* WordPress filters, when used you'll need to add your own additions.
// add_filter( 'pre_get_document_title', 'get_my_bbpress_title_overwrite', 10 );
// add_filter( 'wp_title', 'get_my_bbpress_title_overwrite', 9, 3 );
}
}
function get_my_bbpress_title_overwrite( $title = '' ) {
if ( function_exists( 'bbp_get_topic_title' ) )
return bbp_get_topic_title();
return $title;
}
You can place the snippet (one of them) in your child-theme’s functions.php
file. To read more about using filters, please refer to this guide.
I hope this helps! Please let me know which filter did the trick, as I then might use it as a permanent solution within The SEO Framework :).
Have a great day!