PHPExec Categories – Multipage?
-
I’m hoping someone can help me out. I don’t know much PHP so I think I just can’t get the code right. My site deviantknowledge.com is using Exec-PHP to make the Cateogry links (pages) pull dynamically. It works great execpt it only pulls 10 posts for each category. I would like it to put the 10 posts on the page and then have the “Next Page” option for more results. Can I do this? Is there another plugin I could use?
Any help is very much appreciated. I searched on this for a long time and wrote a bunch of shotty loops and PHP code and just can’t seem to get it. Here’s the code I am using right now. Thanks anyone!
<?php $recentPosts = new WP_Query(); $recentPosts->query('cat=12'); while ($recentPosts->have_posts()) : $recentPosts->the_post(); ?> <h3 class="h1" id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h3> <div class="auth"><span>Posted by <strong><?php the_author_posts_link(); ?></strong></span> on <?php the_time('F j, Y'); ?></div> <?php global $more; $more = 0; ?> <?php the_content('Read the rest of this story »'); ?> <!--Post Meta--> <div class="post-bottom"> <!--<?php if (function_exists('the_tags')) { ?><strong>Tags: </strong><?php the_tags('', ', ', ''); ?><?php } ?>--> <div class="cat"><span><?php the_category(', ') ?></span></div> <div class="clearfix"></div> </div> <?php endwhile; ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘PHPExec Categories – Multipage?’ is closed to new replies.