1

I want to create search form but when I search something nothing happen and this is the code: index.php:

 <div class="tech-btm">
      <?php get_search_form();?>
 </div>

searchform:

<form role="search" method="get" id="searchform" action="<?php echo home_url('/')?>">
    <div><label class="screen-reader-text" for="s">Search for:</label>
        <input type="text" value="" name="s" id="s" />
        <input type="submit" id="searchsubmit" value="Search" />
    </div>
</form>

what is the problem? Is there anything wrong?

0

Did you also put code in index.php to actually display the search results?

https://wordpress.org/support/article/creating-a-search-page/

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.