Note that there are some explanatory texts on larger screens.

plurals
  1. POWordPress Search Problems
    primarykey
    data
    text
    <p>I have researched this problem and still can't seem to figure out why my search function isn't working on a theme I'm working on. Below is my code that I have for my search.php and my searchform.php files. The search files were hardly modified from a boilerplate, blank WordPress theme. When I search for anything, it returns a 404 error. I have researched search's returning 404's and still can't find the solution. Blow is my code, any help would be greatly appreciated.</p> <p>searchform.php----------------------------------</p> <pre><code>&lt;form action="&lt;?php bloginfo('siteurl'); ?&gt;" id="searchform" method="get"&gt; &lt;label for="search"&gt;&lt;object data='&lt;?php bloginfo('template_directory');? &gt;/images/input-search.svg'&gt; &lt;img src='&lt;?php bloginfo('template_directory');?&gt;/images/input-search.png'&gt; &lt;/object&gt;&lt;/label&gt; &lt;input type="search" name="search" /&gt; &lt;/form&gt; </code></pre> <p>search.php---------------------------------------</p> <pre><code>&lt;?php get_header(); ?&gt; &lt;?php if (have_posts()) : ?&gt; &lt;h2&gt;Search Results&lt;/h2&gt; &lt;?php include (TEMPLATEPATH . '/inc/nav.php' ); ?&gt; &lt;?php while (have_posts()) : the_post(); ?&gt; &lt;div &lt;?php post_class() ?&gt; id="post-&lt;?php the_ID(); ?&gt;"&gt; &lt;h2&gt;&lt;?php the_title(); ?&gt;&lt;/h2&gt; &lt;?php include (TEMPLATEPATH . '/inc/meta.php' ); ?&gt; &lt;div class="entry"&gt; &lt;?php the_excerpt(); ?&gt; &lt;/div&gt; &lt;/div&gt; &lt;?php endwhile; ?&gt; &lt;?php include (TEMPLATEPATH . '/inc/nav.php' ); ?&gt; &lt;?php else : ?&gt; &lt;h2&gt;No posts found.&lt;/h2&gt; &lt;?php endif; ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload