Wp Title not working

Forums › Forums › Search & Filter Pro › Wp Title not working

  • This topic has 13 replies, 3 voices, and was last updated 10 years ago by Anonymous.
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)
Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.