Forums Forums Search & Filter Pro Problem with metatag title after search

Viewing 8 posts - 1 through 8 (of 8 total)
  • Anonymous
    #118929

    Hi there I’m using your plugin, and happy with it, but still have one issue. I can not see a proper metatag <title> like ‘my search’ but instead is using as <title> the first record coming from the search.

    I’m using search with archive.php

    Trevor
    #118932

    It will be your theme that is creating that tag, and so you may need to add something to the child theme functions.php file specific to that results page (by page name or ID) to change or set the title. WordPress has its own preferred method to do this, which we allude to here:

    https://www.designsandcode.com/documentation/search-filter-pro/search-results/as-an-archive/#Update_Page_Title

    However, this will only work if your theme uses the same method. If it does not, you will need to ask your theme author for a function to add to the child theme functions.php to set the title.

    Anonymous
    #119633

    Hi there, thank you for the reply, I’m using your code (below) and all is fine unless I activate also Yoast at the same time, how can solve the issue.

    Is not a theme issue but a plugin compatibility issue.

    add_filter(‘wp_title’,’search_form_title’);

    function search_form_title($title){

    global $searchandfilter;

    if ( $searchandfilter->active_sfid() == 1668)
    {
    return ‘Search Results’;
    }
    else
    {
    return $title;
    }

    Trevor
    #119645

    Yoast SEO also has the ability to alter page titles I think, so they must be conflicting. Look through the Yoast settings to see if you can see where this might be.

    Anonymous
    #119862

    Thank you for your reply.

    Finally I solved the issue using Display:post type as my page are custom post type.

    Then using Yoast special pages configuration for the search.

    I have another question for you:

    It is possible to maintain the same search parameters switching from one language to another using WPML.

    I mean if i was searching for ‘one_custom_taxonomy_one_language’ then switch to ‘same_custom_taxonomy_another_language’

    Trevor
    #119890

    I do not think so. Quiet often the taxonomy terms change between languages (are translated and have different ID numbers) I think.

    Anonymous
    #132428

    I’m wondering where that setting is that was changed: Finally I solved the issue using Display:post type as my page are custom post type.

    Is this a setting within SEO Yoast? I’m having the same title issue and cannot figure out where to update this setting.

    Thank you!

    Trevor
    #132462

    Hi Kara

    As I had said before, this is something done by your theme and/or Yoast SEO (if you are using it) and will be coded into the template that your results page is using. It is something you should ask your theme author I think.

Viewing 8 posts - 1 through 8 (of 8 total)