• I am using this on a buddy’s blog to make only posts from specific categories appear in the main field of the blog:

    <?php
    $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts("cat=-10,-21,-139,-3&showposts=5&paged=$page");
    ?>

    The other categories appear in the sidebar (not using widgets)

    The trouble is when a search is performed, the search results only return the mail page …

    Searchform.php:

    <form method="get" id="searchForm" action="<?php bloginfo('home'); ?>"/>
    	<input type="text" value="<?php echo wp_specialchars($s, 1); ?>" name="s" id="s" /><input id="searchsubmit" type="image" src="<?php bloginfo('template_directory'); ?>/images/btn_search.gif" alt="Submit" />
    </form>

    Any thoughts?

Viewing 1 replies (of 1 total)
  • Nothing wrong with the form. Make a search.php template file to display the results (learn it from the default theme).

Viewing 1 replies (of 1 total)
  • The topic ‘Custom main page ruins searchform.php – help?’ is closed to new replies.