• thehenry

    (@thehenry)


    I have the theme, Clean Home, and I was looking to edit the way search results are displayed, however I cannot find the file search.php? Would anyone with this theme or anyone at all, know how I can edit the search results page?

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • mheltone

    (@mheltone)

    Can you post your post.php here?
    We can actually use that. Post it here.

    And do you already have the search form?

    Thread Starter thehenry

    (@thehenry)

    Yes here it is

    <?php get_header(); ?>
    
    	<div id="content">
    	<?php if (have_posts()) : ?>
    
    		<?php while (have_posts()) : the_post(); ?>
    
    		<div class="post">
    
    			<?php the_content('Read the rest of this entry &raquo;'); ?>
    			 <hr/>
    		</div>
    
    		<?php endwhile; ?>
    
    		<div class="navigation">
    			<div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
    			<div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
    		</div>
    
    	<?php else : ?>
    
    		<h2 class="center">Not Found</h2>
    		<p class="center">Sorry, but you are looking for something that isn't here.test</p>
    
    	<?php endif; ?>
    
    	</div>
    
    <?php get_footer(); ?>

    mheltone

    (@mheltone)

    Try this..

    <?php get_header(); ?>
    
    	<div id="content">
    	<h1>SEARCH RESULTS</h1>
    	<?php if (have_posts()) : ?>
    
    		<?php while (have_posts()) : the_post(); ?>
    
    		<div class="post">
    
    			<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
    			<?php the_excerpt(); ?>
    			<small>Posted by <?php the_author(); ?> on <?php the_date() ?></small>
    
    			 <hr/>
    		</div>
    
    		<?php endwhile; ?>
    
    	<?php else : ?>
    
    		<h2 class="center">Not Found</h2>
    		<p class="center">Sorry, but you are looking for something that isn't here.test</p>
    
    	<?php endif; ?>
    
    	</div>
    
    <?php get_footer(); ?>

    Save it as search.php

    See if it works for you.

    Thread Starter thehenry

    (@thehenry)

    This code works perfectly, expect, is there anyway you could make it to where it shows more than just 10 results. Like adding a link at the bottom to read “More Results” Thank you for the help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Clean Home editing the search results page’ is closed to new replies.