• Hi there, I’am excluding a categorie from my frontpage using the simple php code explained in the “how the loop works” section in the docs. Something like “if in categorie “blabla” continue”

    I use this because that categorie is being used to email posts to and we want to moderate and show them on a different page.

    So this categorie gets a lot of traffic and something strange happens. On the frontpage it will show all the other categories but on page 2, so we get an empty frontpage. It seems as if wordpress knows there are newer posts so pushes older posts to the 2nd page while it doesn’t have to show this categorie on the frontpage.

    I hope someone has a clue? Thanks in advance

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi,
    I use the same construct but I have no problem with it? Did you follow these guidelines?
    http://codex.wordpress.org/Template_Tags/in_category

    Anyways this is a piece of my code:

    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <?php if (in_category('Your Category')) continue;?>
    Thread Starter takist

    (@takist)

    That’s exactly what I use. Checked it many times while throwing keyboards, mouses and mouse pads through the server room… :s

    I’ll go and check it again, maybe I’ll see a typo this time…

    Thread Starter takist

    (@takist)

    This is getting frustrating, checked the code on typos,none there..

    If I delete the <?php if (in_category('Your Category')) continue;?> everything works fine. If I check my source via the browser I get this response `

    <div id=”header”>
    <div id=”headerimg”>
    </div>
    </div>
    <hr />

    <div id=”content” class=”narrowcolumn”>

    <div class=”navigation”>

    <div class=”alignleft”>« Older Entries</div>
    <div class=”alignright”></div>
    </div>`

    So it seems wordpress just fails to output anything….

    Thread Starter takist

    (@takist)

    Solved it with writing my own query and resetting this at the end of the loop. Why I had to it this way, not a clue…

    Can you show us how you fixed this? I’m having problems with page navigation not working after excluding a category and really need help…

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘excluding categories’ is closed to new replies.