WordPress.org

Ready to get started?Download WordPress

Forums

Search results are blank (10 posts)

  1. hozomeen
    Member
    Posted 4 years ago #

    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?

  2. esmi
    Theme Diva & Forum Moderator
    Posted 4 years ago #

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

  3. hozomeen
    Member
    Posted 4 years ago #

    onejozef.com/wordpress

  4. rooodini
    Member
    Posted 4 years ago #

    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.

  5. PBP_Editor
    Member
    Posted 4 years ago #

    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/">

  6. rooodini
    Member
    Posted 4 years ago #

    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.)

  7. hozomeen
    Member
    Posted 4 years ago #

    @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?

    @rooodini:
    search.php

    <?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>
    		</div>
    
    		<?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>-->
    						</ul>
    					</div>
    
    					<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...'); ?>
    					</div>
    				</div>
    			<?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>
    			</ul>
    
    			<?php else : ?>
    
    				<h3>Not Found</h2>
    				<p>Sorry, but you are looking for something that isn't here.</p>
    
    			<?php endif; ?>
    	</div>
    
    	<hr />
    
    	<?php get_sidebar(); ?>
    
    	<?php get_footer(); ?>
  8. PBP_Editor
    Member
    Posted 4 years ago #

    The search form is not in the sidebar.php?

    If not then it is in the widgets.

    Take a look at this
    http://codex.wordpress.org/Function_Reference/get_search_form

  9. rooodini
    Member
    Posted 4 years ago #

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

  10. rooodini
    Member
    Posted 4 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.