Can't remove search feature from News page (5 posts)

  1. CTidnam
    Posted 3 years ago #

    I cannot get rid of the search feature on our news page: http://tmp.firststeptrust.org.uk/news/

    I disabled the search widget but that didn't work. Then I deleted the search widget but it still appears.

    Can anyone suggest how I can solve this problem?



  2. Andrew Nevins
    Forum moderator
    Posted 3 years ago #

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

  3. CTidnam
    Posted 3 years ago #

    Thanks very much - I will give this a go.

  4. Tom Combs
    Posted 3 years ago #

    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="http://tmp.firststeptrust.org.uk/">
    	<div id="search-text">
    		<input type="text" value="" name="s" id="s" autocomplete="off" />
    	<input type="submit" id="searchsubmit" value="" />
    	<br class="clear">
    <?php } ?>
  5. CTidnam
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic