Please can you help me with my search.php on my website?

Do you think it would be possible to help me with my search.php form pleaseee?

Thank you!

  • cleaus_neverson_browne

    Yes i am thanks! :slight_smile:

    Thank you

    Well the search form isnt working on my site for some reason, and i dont know why.

    I have the "search everything" plugin (doesnt work when i disable all plugins either) but the plugin is working because when i type a search term, it highlights all the words on the site that correspond, but no actual results come up.

    I have "search.php" and "searchform.php" that look like this:

    "search.php"

    <?php
    /**
     * Search Template
     *
     * The search template is used to display search results from the native WordPress search.
     *
     * If no search results are found, the user is assisted in refining their search query in
     * an attempt to produce an appropriate search results set for the user's search query.
     *
     * @package WooFramework
     * @subpackage Template
     */
    
     get_header();
     global $woo_options;
    ?>
        <!-- #content Starts -->
    	<?php woo_content_before(); ?>
        <div id="content" class="col-full">
    
        	<div id="main-sidebar-container">    
    
                <!-- #main Starts -->
                <?php woo_main_before(); ?>
                <section id="main" class="col-left">
    
                	<header class="page-header">
    				<h1 class="page-title"><?php printf( __( 'Search Results for: %s', '' ), get_search_query() ); ?></h1>
    			</header><!-- .page-header -->
    <?php
    $query = new WP_Query( array( 's' => get_query_var('s')) );
    
    // The Loop
    if ( $query->have_posts() ) {
        echo '<ul>';
        while ( $query->have_posts() ) {
            $query->the_post();
            echo '<li>' . get_the_title() . '</li>';
        }
        echo '</ul>';
    }
    ?>
    <?php var_dump($the_query) ?>
                </section><!-- /#main -->
    
                <?php get_sidebar(); ?>
    
    		</div><!-- /#main-sidebar-container -->         
    
    		<?php get_sidebar( 'alt' ); ?>       
    
        </div><!-- /#content -->
    	<?php woo_content_after(); ?>
    <?php get_footer(); ?>

    and "searchform.php"

    <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>

    Please, please tell me where I am going wrong? :slight_smile:

    Thank you in advance guys! I really appreciate this!
    Cleaus

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.