Support » Fixing WordPress » Previous/Newer Posts with Categories

  • Resolved electrickiwi


    0 down vote favorite

    I’m having some major problems getting my older/newer posts working on WordPress when only showing 1 category’s posts on a page.

    It worked absolutely fine before I was defining a category, but now my client wants one category on one page, and another category on another.

    The code that I’m using is pasted below. If you’d like a temporary login, I can set you up.. this has been driving me crazy for the past 2 hours!

    <?php $my_query = new WP_Query($querystring . 'cat=3&posts_per_page=8');
      while ($my_query->have_posts()) : $my_query->the_post();
      $do_not_duplicate = $post->ID; ?>
    <?php /* Start the Loop */ ?>
                    <?php get_template_part( 'content', get_post_format() ); ?>
            <div class="post"  id="post-<?php the_ID(); ?>">
                        <h2 class="date"><?php the_time('F j, Y') ?></h2></div>
                <div class="entry-content">
                    <?php the_content('Read the rest of this entry'); ?>
                    <?php wp_link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?>
            <?php endwhile; ?>

    Any help would be GREATLY appreciated! Thank you.

Viewing 1 replies (of 1 total)
  • Managed to get it working using the WP Posts Filter plugin. Not perfect, but a workaround which does what I need it to.

Viewing 1 replies (of 1 total)
  • The topic ‘Previous/Newer Posts with Categories’ is closed to new replies.