- This topic has 13 replies, 3 voices, and was last updated 9 years, 3 months ago by .
These forums are now closed and remain for historical purposes.
None of the content applies to the new version 3. For support, get in touch via our contact form.
Forums › Forums › Search & Filter Pro › Wp Title not working
OK. That means that your theme does not use that hook. Back to the drawing board. I will use this then:
https://developer.wordpress.org/reference/hooks/document_title_parts/
add_filter('document_title_parts', 'search_form_title');
function search_form_title($title){
global $searchandfilter;
if ( $searchandfilter->active_sfid() == 35889) {
return 'Search Results';
} else {
return $title;
}
}
Good afternoon Trevor,
Unfortunately this has no effect on the results page.
The title of “Blog” remains.
Do you have any other suggestions? I can see examples of other websites using this plugin that have a different title.
If it is not possible to get your code working I don’t mind if I have to manually set the page title, just not sure where to do this.
Kind regards,
Colin
Hi I fix this passing from archive to shortcode mode using a page template, in this way I create the page on the WP dashboard and I can manipulate the title with Yoast SEO plugin. Also, this has a detail, you need to cover the with a page the archive page name.
For example, if the custom post type is event, then you need to create a page with that name and assign the page template that you create. Otherwise if someone gets there is going to find a generic archive page.
😉