WordPress search not able to find the category


I have 3 to 4 categories on my website. I am using WordPress search but when I am searching my category then I am getting

Nothing Found

also, I tried to search the subcategory then also I am getting the same message.

Would you help me out with this issue?


 <section id="primary" class="content-area mainSearch">
    <main id="main" class="site-main">
      <div class="equalPadding">
        <div class="cp-seeWrapper">
    <?php if ( have_posts() ) : 
          get_search_form();//search form
          <div class="resultCount"><?php
          global $wp_query;
          echo $wp_query->found_posts.' RESULTS';
         <div class="row">

       while (have_posts()){the_post();?>
        //displaying result here

       <?php } ?>

    else :
      get_template_part( 'template-parts/content', 'none' );

    </main><!-- #main -->
  </section><!-- #primary -->
, , , , Naren Verma 1 year 0 Answers 85 views 0

Leave an answer