Support Forum

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.






NOTE : Due to personal issue, this Ultimate WP Query Search Filter Plugin is no longer under development. Thanks for the support over the years.

Anyone that come across this page that want to find a realible saerch plugin, here are the list of potential replacements.

Plugin author will no longer giving support here, however you can still asking for help from other users here.
Pages: [1]
Author Topic: modify title of search results
trauch
Newbie
Posts: 2
Permalink
Post modify title of search results
on: October 25, 2016, 17:25
Quote

I am using this plugin to create custom pages for a news aggregator site.

In essence, I have a news aggregator site that uses over 100 rss feeds. The feeds are assigned to categories such as Biotech, News, Analysis, Reports, etc.

I do not want to use a filter mechanism on the rss feeds to limit the feed further by subject or location because I will then need to create multiple versions of the same rss feed for each location (feed for USA, feed for UK, feed for France, etc.).

Instead I would like to use your plugin to conduct compound searches on the pulled feeds. I have tried it and it works perfectly.

I will be using these generated search pages for news sections by location (ie. USA biotech news).. In this case I choose the "Biotech" Category and simply add a keyword search for "USA"

Again, it works perfect. The resulting page provides the results and the title of the results page is "Search Results For - USA"

While the results are great I would like to change/define the title.

Is there any way I can easily add something to the url string to define the title.

In the above example I would want it to simply say "USA Biotech News" [also removing "Search Results For -"

Alternatively, can I use the plugin language database to create a title that adds the selected Category code and the keyword?

Thanks for your help and again, great plugin!

tck30
Administrator
Posts: 530
Permalink
Post Re: modify title of search results
on: October 25, 2016, 17:52
Quote

There are two things you want to change - the page tile and the search result header, right?
Foe page title, you can use wp_title() hook to customization.
For search result page, you will need to edit it in your theme's search.php.

For the customization above, you'll need to get the search query parameters, there are all in the url. You just need to extracted them for you use.
There are old threads (like this and this) discussed about this, you can try google them.

New Add-On Plugins for Ultimate WP Query Search Filter has been released! Check it out now.

Buy Me A Beer! Thanks

trauch
Newbie
Posts: 2
Permalink
Post Re: modify title of search results
on: October 26, 2016, 18:04
Quote

Thanks. I am actually only really interested in changing the "Search Result Header" and we are going to go in a direction. What I have done is simply change the Theme's language file at this location include/translate.php to remove the text "Search Results for -"

The code now reads,
'search_results_for' => array('option_title' => 'Search Results For - ', 'translated' => __('', THEME_SLUG), 'option_desc' => 'Title for search results template'),

However, now that I completely removed the "Search Results for -" text I would like to add a image of a search magnifying glass icon before the search terms. Any suggestions?

tck30
Administrator
Posts: 530
Permalink
Post Re: modify title of search results
on: October 28, 2016, 05:18
Quote

Well, this is more on the theme side, you need to consult with your theme developer.
But in my opinion, you just need to change the array option_title' => 'Search Results For - ' to your img html tag.

option_title' => '<img scr=">'

Just a thought. Might not working. If you have problem with this, go for the theme developer as this is unrelated to this plugin anymore.

New Add-On Plugins for Ultimate WP Query Search Filter has been released! Check it out now.

Buy Me A Beer! Thanks

Pages: [1]