CSS search.php question?

Discussion in 'Web Design and Development' started by kclimson, Mar 15, 2012.

Thread Status:
Not open for further replies.
  1. kclimson macrumors newbie

    kclimson

    Joined:
    Aug 15, 2011
    Location:
    Canada
    #1
    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 :)
     
  2. jared_kipe macrumors 68030

    jared_kipe

    Joined:
    Dec 8, 2003
    Location:
    Seattle
    #2
    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?
     
Thread Status:
Not open for further replies.

Share This Page