phpchick Posted December 25, 2010 Share Posted December 25, 2010 <ul> <!-- List the rest of the articles found in the category --> <?php else : ?> <li class="otherrecentmain"><span class="title"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></span> <span class="meta"></span> </li> <?php endif; ?> <?php endwhile; ?> <!-- END --> </ul> For some reason, its stuck on displaying 9 articles but I want to be able to control how many I want. I may want to choose 17 or whatever etc, not sure how to add it into the php. Link to comment https://forums.phpfreaks.com/topic/222625-make-code-display-specific-number-of-titles/ Share on other sites More sharing options...
joel24 Posted December 25, 2010 Share Posted December 25, 2010 that code is in a loop...? will need to see the rest of the code.. Link to comment https://forums.phpfreaks.com/topic/222625-make-code-display-specific-number-of-titles/#findComment-1151321 Share on other sites More sharing options...
phpchick Posted December 25, 2010 Author Share Posted December 25, 2010 <?php get_header(); ?> <div id="content" class="container"> <div id="front" class="column_main"> <div class="category_header"> <?php is_tag(); ?> <?php if (have_posts()) : ?> <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?> <?php /* If this is a category archive */ if (is_category()) { ?> <h1><?php single_cat_title(); ?> News</h1> <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?> <h1>Posts Tagged ‘<?php single_tag_title(); ?>’</h1> <?php /* If this is a daily archive */ } elseif (is_day()) { ?> <h1><?php the_time('F jS, Y'); ?></h1> <?php /* If this is a monthly archive */ } elseif (is_month()) { ?> <h1><?php the_time('F, Y'); ?></h1> <?php /* If this is a yearly archive */ } elseif (is_year()) { ?> <h1><?php the_time('Y'); ?></h1> <?php /* If this is an author archive */ } elseif (is_author()) { ?> <h1>Author Archive</h1> <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?> <h1><?php bloginfo('name'); ?> Archives</h1> <?php } ?> </div> <?php $count = 0; ?> <?php while (have_posts()) : the_post(); ?> <?php $count++; ?> <?php if ($count == 1) : ?> <!-- The 1st post, displayed as featured from each category with the black background by default --> <div id="featured"> <h2><?php the_category(', '); ?></h2> <h1><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1> <br /> <?php the_content('Continue...'); ?> <div class="clear"></div> </div><!-- END --> <h2>Latest <?php single_cat_title(); ?> News</h2> <ul> <!-- List the rest of the articles found in the category --> <?php else : ?> <li class="otherrecentmain"><span class="title"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></span> <span class="meta"></span> </li> <?php endif; ?> <?php endwhile; ?> <!-- END --> </ul> <?php else : ?> <!-- If there is nothing --> <h1>Not Found</h1> <?php endif; ?> <!-- END --> </div> <?php get_sidebar(); ?> </div> <?php get_footer(); ?> Link to comment https://forums.phpfreaks.com/topic/222625-make-code-display-specific-number-of-titles/#findComment-1151344 Share on other sites More sharing options...
.josh Posted December 25, 2010 Share Posted December 25, 2010 well I don't see anything in that code that would cap it at 9...do you even have more than 9 articles to display? Link to comment https://forums.phpfreaks.com/topic/222625-make-code-display-specific-number-of-titles/#findComment-1151409 Share on other sites More sharing options...
joel24 Posted December 26, 2010 Share Posted December 26, 2010 Google tells me that code is from a wordpress install, haven't played with WP much so you'll probably want to have this topic moved to the PHP Application board where someone may be able to help. all I can suggest is to have a look around google or in your theme's config files and you should be modify it to display more posts. Link to comment https://forums.phpfreaks.com/topic/222625-make-code-display-specific-number-of-titles/#findComment-1151456 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.