Dan Carp
asked on
Wordpress PHP List Limited to 10 Items
I'm helping out with a Wordpress site. This client has a list of projects on a page that seems limited to displaying only the most recent 10 posts tagged as projects. In looking at the PHP for this page, however, I can't find the variable that is restricting the list to only the most recent 10. To confirm, there are currently 12 projects, only 10 listed, and if I create a new test project post, the oldest of the 10 is temporarily bounced from the list. Could somebody suggest where to look so that I could expand the list to all project posts? Current PHP for this page follows.
Thanks in advance!
Thanks in advance!
<?php get_header(); ?>
<div id="content">
<div id="contentleft">
<div class="postarea">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="posttitle">
<h3><?php the_title(); ?></h3>
</div>
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
<?php
echo '<div class="projects">';
echo '<ul class="project-list">';
$my_query = new WP_Query('post_type=project');
if($my_query->have_posts()) : while($my_query->have_posts()) : $my_query->the_post();
echo '<li><span><a href="#' . get_the_ID() . '" rel="facebox">';
if(has_post_thumbnail()){
the_post_thumbnail('project-thumbnail');
}
echo '</a><div class="expanded" id="' . get_the_ID() . '">';
if(has_post_thumbnail()) {
the_post_thumbnail('content-image');
}
echo '<br/>';
echo '<h1>' . get_the_title() . '</h1>';
the_content();
echo '</div>';
echo '</span><br/>';
echo '<strong>' . get_the_title() . '</strong>';
the_excerpt();
echo '</li>';
endwhile; endif;
wp_reset_query();
echo '</ul>';
echo '<div class="clear"></div>';
echo '</div>';
wp_reset_query();
?>
<?php the_content(__('Read More'));?><div style="clear:both;"></div><?php edit_post_link('(Edit)', '', ''); ?>
</div>
</div>
<?php include(TEMPLATEPATH."/sidebar_right.php");?>
</div>
<!-- The main column ends -->
<?php get_footer(); ?>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You're welcome. Thanks for the points.
ASKER