Removing Navigation When Not Needed?

  • Author
  • #193215


    Hey, I have styled the default:

    <div class=”navigation”>
    <div class=”alignleft”><?php next_posts_link(‘« Older Entries’) ?></div>
    <div class=”alignright”><?php previous_posts_link(‘Newer Entries »’) ?></div>

    Now the problem I am having is when you are in a category page that doesn’t have or need the “« Older Entries or Newer Entries” the code still shows up.. I have put a background color on the “navigation” class so now on those pages it just has an empty colored div heh..

    How do I make it so that it ONLY shows up when there is actually “navigation” to display?



    Nobody knows the answer to this?



    Can you give us a link to your blog? I have a sneaking suspicion you’re in the wrong forum and need to be over at



    I have posted this on the site as well with no response and I can’t even see my post being listed heh.

    What is the difference between the two?

    You can see the blog at

    What I have explained above isn’t live, well at least the styling part. The navigation div still shows up in the code when it isn’t needed though.



    Okay, you DO need to be over at That’s not a blog and it doesn’t work the same. We do not have the access to be working with that code, so we will not be able to help you at all.



    And the difference between the two is in a sticky at the top of this forum.

The topic ‘Removing Navigation When Not Needed?’ is closed to new replies.