Support » Fixing WordPress » Can't remove search feature from News page

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Andrew Nevins


    Forum moderator

    You could use CSS to display none the search widget area, hiding it from view but still rendering it to search engines.

    Thanks very much – I will give this a go.

    A better option than “display:none;” would be to check your themes sidebar.php file for the search code, from the source code, it doesn’t look like it is a widget.

    If you only want to hide the search on the news page, find the code for the search form, then wrap it in an if/else statement.
    something like this…

    // If is news page, don't do anything
    if ( is_page('news') ) {
     // Otherwise show the form
         else { ?>
    <form method="get" id="searchform" action="">
    	<div id="search-text">
    		<input type="text" value="" name="s" id="s" autocomplete="off" />
    	<input type="submit" id="searchsubmit" value="" />
    	<br class="clear">
    <?php } ?>


    Thanks Tom – we’ll try this as well. The odd thing is that it does appear as a widget and Dashboard allows you to disable it. Maybe this widget refers to something else.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Can't remove search feature from News page’ is closed to new replies.