Display Category Posts on Non WP website
-
Hello,
We use WP as a “backend” for posting to our website. This works fine with categories that don’t generate many static posts. We do have on page, however, that posts audio each week. The audio is static and remains on the page forever. This is getting to be a problem with loading all the audio. I would like to post the audio, limit the amount per page and provide pagination. Our current Loop code doesn’t provide this option. I’ll post our code below – I’m hoping someone can help us modify it to allow for the post limit and pagination. Thanks!
Before any code on .php page:
<?php require('../post/wp-blog-header.php'); $infocus = new wp_query('cat=2402&showposts=10');?>
The loop to display the posts:
<?php while ($infocus->have_posts()): $infocus->the_post(); ?> <div class="focus-post"> <h2><?php the_title(); ?></h2> <?php the_content (); ?> </div> <?php endwhile; ?>
I have tried pasting different pagination code I’ve found but it doesn’t work – when you click the “Next” we generally get a “404”.
Thanks!
The page I need help with: [log in to see the link]
- The topic ‘Display Category Posts on Non WP website’ is closed to new replies.