i had added search bar through sidebar , called in header.php.it's working posts/products not categories. please me custom search.php search categories. search.php file here...
<?php if ( have_posts() ) : ?> <header class="page-header"> <h1 class="page-title"><?php printf( __( 'search results for: %s', 'mysite' ), get_search_query() ); ?></h1> </header><!-- .page-header --> <?php // start loop. while ( have_posts() ) : the_post(); /* * include post format-specific template content. if want * use in child theme, include file called called content-___.php * (where ___ post format) , used instead. */ get_template_part( 'content', get_post_format() ); endwhile; // previous/next post navigation. mysite_paging_nav(); else : // if no content, include "no posts found" template. get_template_part( 'content', 'none' ); endif; ?>
Comments
Post a Comment