Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Status
Not open for further replies.

kclimson

macrumors newbie
Original poster
Hey guys, I'm working on my search.php page for wordpress, but when I search something on my website I always get only one result. Am i doing something wrong? Below is the search.php main part (excluding header, sidebar, and footer).




<?php $posts=query_posts($query_string .
'&posts_per_page=15'); ?>
<?php if (have_posts()) : ?>




<div class="PUSHHH">

<div class="thumbnail">

<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
<img src="<?php bloginfo('template_directory'); ?>/timthumb.php?src=<?php getImage('1'); ?>&w=150&h=150&zc=1">
</a>
</div>


<a class="titlesearch" href="<?php the_permalink() ?>" rel="bookmark"
title="Permanent Link to <?php the_title_attribute(); ?>">
<?php the_title(); ?>
</a>

<div>
<a class="textunderneath"> <?php the_time('l, f j, Y - g:ia') ?> by <?php the_author() ?> | </a> <a class="searchcomments"> <?php comments_number( 'no responses', 'one response', '% responses' ); ?> </a>

</div>

</div>
<?php else : ?>
<?php endif; ?>


Please help out guys. It would mean a lot 🙂
 
Let me start off with saying I've never used wordpress.

It checks to see if there are posts "if (have_posts()) :" but it never iterates over them.

What did the stock search page look like? Did it have a foreach clause?
 
Status
Not open for further replies.
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.