• Hi, I’m admittedly new to utilizing search in my sites but I can’t seem to figure out why the only thing that shows up is a 404 when using a search bar. Any advice?

Viewing 1 replies (of 1 total)
  • Hi there,

    In your search form you need the action attribute of the form element to be set to the home URL. Something similar to this:

    <form role="search" method="get" class="search-form" action="<?php echo home_url( '/' ); ?>">

    You could also look at the code reference for get_search_form().

Viewing 1 replies (of 1 total)
  • The topic ‘Search only shows 404 page’ is closed to new replies.