2 query_posts on front page “previous entry” link doesn’t work
-
Ok so here is the deal. I have been modding wordpres themes for a while, so I decided to up my game and try at writing my own theme. I am having to learn the little bit of PHP I need as I go. On this theme I am creating it is very similar to https://rin-windy.com . I was able to get the two different columns, with the different authors in each. Here is the code I used.
<?php if (is_home()) { query_posts ("author=1") ; } ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?>
for the left side
<?php query_posts ("author=3"); ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?>
for the right side
This displays perfectly for the front page but then when I click my navigation buttons they take me to the second page but it has the same posts that were on the front page. Here is the code I am using for the navigation
<div class="navigation"> <div class="alignleft"><?php next_posts_link('« Older Entries') ?></div> <div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div> </div>
Hopefully I am missing something simple here, I am a novice and would appreciate any help anyone can give me. Thanks
- The topic ‘2 query_posts on front page “previous entry” link doesn’t work’ is closed to new replies.