You are here:  » Pass term in to search title

Active Forum Topics

Pass term in to search title

Submitted by Andrew1 on Mon, 2018-03-05 11:42 in


Is it possible to pass the search term in to the title of the search page and main heading.

So instead of just 'shop'. Search results for 'keywords'.

I had achieved this on the standalone, but I can't see how to this in the WP version.

Many thanks

Submitted by support on Mon, 2018-03-05 12:27

Hi Andrew,

Version 3 (BETA) should be setting the header <title> however is not overriding the container page title but this can be done easily - edit the plugin file pto.php and look for the following code at line 638:

        $title = htmlentities($pto_q,ENT_QUOTES,get_option("blog_charset"));

...and REPLACE with:

        $title = htmlentities($pto_q,ENT_QUOTES,get_option("blog_charset"));
        $title_override = TRUE;

Hope this helps!


Submitted by Andrew1 on Mon, 2018-03-05 17:18

Thanks David. That works perfectly.