WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Exclude Categories from main blog (5 posts)

  1. honeybeemanor
    Member
    Posted 4 years ago #

    I've installed wordpress on my blog (http://honeybeemanor.com), and I would like to blog about my dreams, BUT I don't want it to be displayed on my main page. I want the average user to read my regular blogs and then click the dream category to the left if they wish to.

    I searched the wordpress.com forums and found this -- http://en.forums.wordpress.com/topic/excluding-categories#post-422632 -- but it was never resolved. I asked there, and they directed me here to .org :) Can I present more info if that's too confusing? Is this possible, or should I just continue an off-site blog about dreams to not have it jumbled together?

  2. MichaelH
    Member
    Posted 4 years ago #

    The article The Loop has an example of excluding categories and the Simply Exclude plugin will also do that.

  3. keesiemeijer
    moderator
    Posted 4 years ago #

    If your dream category id = 3 you can put this in front of the loop:
    <?php query_posts('cat=-3'); ?>
    look in your index.php for the start of the loop and put it in front of it. The loop starts here:

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  4. honeybeemanor
    Member
    Posted 4 years ago #

    Thank you! The top one worked like a charm!
    I'm sure the second one would have too, but it was confusing, as I am a dummy. :)

    Thanks again!

  5. keesiemeijer
    moderator
    Posted 4 years ago #

    Glad you got it working! Now, please use the dropdown at top right to mark this topic 'Resolved'.

Topic Closed

This topic has been closed to new replies.

About this Topic