WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Template Only Returning 5 Results (3 posts)

  1. Rick5150
    Member
    Posted 1 year ago #

    I have this page where all of my testimonials are shown and it works great. The problem is that it appears to be linked to the front page reading settings so that it is only displaying the last 5 posts.

    How can I show unlimited testimonials on that one page, or at worst display a READ MORE that will allow the older posts to show?

    I am fairly code illiterate, but the current code is:

    <?php
    
    /*
    
    Template Name: Testimonials
    
    */
    
    ?>
    
    <?php get_header(); ?>
    
    <div id="main">
    
    <p>Here are some of our testimonials. These are from <em>actual customers</em> who have received a jacket from us. All documentation and original testimonials are on file.</p>
    
    <?php query_posts('cat=113');
    
    while (have_posts()) : the_post();
    
    the_content();
    
    endwhile;
    
    ?>
    
    </div>
    
    <?php get_footer(); ?>
  2. Rick5150
    Member
    Posted 1 year ago #

    Solved like this...

    <?php
    /*
    
    Template Name: Testimonials
    
    */
    
    $catquery = new WP_Query( 'cat=113&posts_per_page=30' );
    while($catquery->have_posts()) : $catquery->the_post();
    ?>
    
    <?php get_header(); ?>
    
    <ul>
    
    <?php the_content(); ?>
    </ul>
    
    </ul>
    
    <?php endwhile; ?>
    <?php get_footer(); ?>
  3. Rick5150
    Member
    Posted 1 year ago #

    I guess this should be "resolved" now.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.