Jump to content
Sign in to follow this  
fintan

How to stop widgets showing up on my search results pages?

Recommended Posts

fintan

Hi All Another headscratcher! There doesn't seem to be a way to edit the template for the Search results pages and I have all the site widgets I'm using showing up, how do I prevent them from being included? All advice/help gratefully accepted as always -- Fintan p.s. How does one mark a question as answered in this forum?

Share this post


Link to post
Share on other sites
kastelic
If you get the plugin Widget Logic you can use wordpress conditionals to choose which widgets appear where. For example, once its activataed go to Appearance -> Widgets and go to your widget, and in the field provided by Widget Logic type: [code]!is_search()[/code] which will remove it from the search page. If you are talking about pagelines sections rather than sidebar widgets, then the only option is to hide them on that page with CSS, as all posts pages (blog, archive, search etc.) are treated the same. Here's an example, you will need Google Chrome or Firebug to right-click and "inspect" elements to find the correct ids or classes. This example will hide the Feature slider on the SEarch page only: [code] .search #feature { display: none } [/code]

Share this post


Link to post
Share on other sites
fintan
Brilliant, worked a treat :) thanks for taking the time to give a detailed answer really appreciate it. -- Fintan

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×