• Resolved landscribe

    (@landscribe)


    Hi, I am having problems customising my theme to show the following on the front page (this is a two columned theme):

    Main column: post(s) from all categories except one category “on the run” (ID 27)

    Left column: post(s) from only the category “on the run” (ID 27)

    I’ve been going around in circles looking in the codex and in the support forums — I’ve looked at using multiple loops, and using query_posts, but I just can’t seem to get this scenario to work! I’m good with html and css… but still getting to grips with php!

    The code I have at the moment is:

    Main Column:

    `<?php
    query_posts(‘cat=-27’);
    ?>

    <div id=”post”>

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    …the post…

    <?php endwhile; else: ?>
    <div id=”browsebubble”>Sorry, there seems to have been a problem. You have probably followed a link to an entry or category that no-longer or never existed!</div>
    <?php endif; ?>
    </div>`

    Left Column:

    `<?php rewind_posts(); ?>
    <?php
    query_posts(‘cat=27’);
    ?>

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    …the post…

    <?php endwhile; else: ?>
    <div id=”browsebubble”>Sorry, there seems to have been a problem. You have probably followed a link to an entry or category that no-longer or never existed!</div>
    <?php endif; ?>`

    Can anyone give me some basic pointers to get me going with this…? The problem with the code above: it displays properly on the home page, but when the links to the posts are clicked (the post titles) the link does not go to the posts page, it just reloads the homepage (even though the URL changes to the posts unique URL).

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • First of all: Adding_Asides

    Secondly, have you considered that your code is correct that perhaps your Permalinks aren’t working properly?

    With no link to your blog, I can’t check that guess, but it would be interesting if you changed your Permalinks to Default to see if that makes a difference.

    Thread Starter landscribe

    (@landscribe)

    Cheers HandySolo.. I think the Asides code is what I was after, and it looks to be working now.

    No live page yet, so no link.. had considered permalink problems, and set them to default already…

    Thanks as always!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Multiple Loops (yet again!)’ is closed to new replies.