Forums Forums Search & Filter Pro Wp Title not working

Viewing 4 posts - 11 through 14 (of 14 total)
  • Trevor
    #63444

    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;
     }
    }
    Anonymous
    #63671

    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

    Trevor
    #63673

    Hi

    There must be something in your theme that is causing this, and that is something I cannot fix from here.

    Anonymous
    #69109

    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.

    😉

Viewing 4 posts - 11 through 14 (of 14 total)