• Resolved tollboy

    (@tollboy)


    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('&laquo; Older Entries') ?></div>
    <div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
    </div>

    Hopefully I am missing something simple here, I am a novice and would appreciate any help anyone can give me. Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter tollboy

    (@tollboy)

    Hate to bump this so soon but I could really use a hand.

    Thread Starter tollboy

    (@tollboy)

    I was able to figure it out myself, it only costs me a few more hairs.
    The first line needed a query_string . So each query on either side should look like this.

    <?php query_posts ($query_string."&author=3"); ?>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>

    and then you change the author accordingly.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘2 query_posts on front page “previous entry” link doesn’t work’ is closed to new replies.