Support » How-To and Troubleshooting » Search results are blank

Search results are blank

  • My search results come up with the category but no content.

    I have two blogs. On one my search works, so I copied and pasted my search results file to the one where it’s not working…still nothing. Anyone know where the problem may lie?

Viewing 9 replies - 1 through 9 (of 9 total)
  • esmi


    Forum Moderator

    Unless you provide a link to your site, no one will be able to offer much in the way of specific help.


    Looks like there are problems in your template’s search.php file.

    Can you post the code in your search.php file here so someone can help find the bugs?

    It looks like template tags, including the_title() may be wrong.

    The search method may be wrong

    <form method=”get_the_excerpt()” id=”searchform” action=”http://onejozef.com/wordpress/”>

    Try changing that to

    <form method=”get” id=”searchform” action=”http://onejozef.com/wordpress/”>

    Good spot, PBP_Editor! This might well be causing a problem on some browsers (doesn’t seem to be a problem on safari or firefox for mac.)

    @pbp_editor: i can find that in the page source code but i can’t find it in any of my php files…any ideas?


    <?php get_header(); ?>
    	<div id="content" class="col span-8">
    		<div class="col last span-6 nudge-2">
    			<h4 class="ver small">Search results</h4>
    		<?php if (have_posts()) : ?>
    			<?php while (have_posts()) : the_post(); ?>
    				<div class="post">
    					<div class="col span-2">
    						<ul class="nav">
    							<!--<li><?php the_time('F j, Y'); ?></li>-->
    							<li>In <?php the_category(', '); ?></li>
    							<!-- Uncomment if you want support for tags -->
    							<!-- <li>Tagged as <?php the_tags( '', ', ', ''); ?></li> -->
    							<!--<li><?php comments_number('No comments yet','One comment','% comments'); ?></li>-->
    					<div class="post-content col last span-6">
    						<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
    						<?php the_excerpt('Continue reading...'); ?>
    			<?php endwhile; ?>
    			<ul class="navigation">
    				<li class="left"><?php next_posts_link('&larr; Older Entries') ?></li>
    				<li class="right"><?php previous_posts_link('Newer Entries &rarr;') ?></li>
    			<?php else : ?>
    				<h3>Not Found</h2>
    				<p>Sorry, but you are looking for something that isn't here.</p>
    			<?php endif; ?>
    	<hr />
    	<?php get_sidebar(); ?>
    	<?php get_footer(); ?>

    The search form is not in the sidebar.php?

    If not then it is in the widgets.

    Take a look at this

    The search form code is in: wp-content/themes/modern-clix/searchform.php

    Hmm… Can’t see what’s wrong with your search.php…

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Search results are blank’ is closed to new replies.