WordPress.org

Ready to get started?Download WordPress

Forums

Search Results Searching Only Current Page & Search Results Header Issues (4 posts)

  1. dtrickky
    Member
    Posted 2 years ago #

    Hi there,

    I'm a few issues with the search results page of my theme.

    My search output puts the current page into the search parameters. For example, if I'm on a category archive page, my search result looks as follows:

    /category/?s=*SEARCHTERMS*&submit=Search

    The search is only querying the current page category.

    Unfortunately, this only begins my problems...

    When on a search results page, there seems to be space added above the header. It looks as if the <body> is being pushed down 50px, but the background image is still showing up. So, perhaps it is pushing the header-wrap down 50px. I can't really tell because Firebug is showing no real help.

    All the other pages appear with the header-wrap flush to the top of the browser.

    My searchform.php looks as follows:

    <form method="get" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>">
    		<label for="s" class="assistive-text"><?php _e( 'Search', 'twentyeleven' ); ?></label>
    		<input type="text" class="field" name="s" id="s" placeholder="<?php esc_attr_e( 'Search', 'twentyeleven' ); ?>" />
    		<input type="submit" class="submit" name="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'twentyeleven' ); ?>" />
    	</form>

    Any suggestions?

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    searchform.php has nothing to do with the search results page. Try looking at your theme's search.php template file instead.

  3. dtrickky
    Member
    Posted 2 years ago #

    My search.php file is nearly a direct copy of the archives.php file, and the archives.php seems to be displaying fine.

    Is your hunch that this is a style issue? I can't seem to find anything suggesting that it is yet.

  4. esmi
    Forum Moderator
    Posted 2 years ago #

    Try validating your search results page first.
    http://codex.wordpress.org/Validating_a_Website

Topic Closed

This topic has been closed to new replies.

About this Topic