WordPress.org

Ready to get started?Download WordPress

Forums

Exclude categories in homepage (7 posts)

  1. Aen
    Member
    Posted 7 years ago #

    How do I exclude certain categories in the homepage? Right now it's display entries of every category, I wish to exclude some.

  2. BPartch
    Member
    Posted 7 years ago #

    Hello

    You will need to edit the sidebar.php file

    <?php wp_list_cats('sort_column=name&exclude=1, 2, 3, 4'); ?>

    The 1, 2, 3, 4 are the category ID numbers that will be excluded in the example above.

  3. moshu
    Member
    Posted 7 years ago #

  4. BPartch
    Member
    Posted 7 years ago #

    O, haha, I think I misunderstood what you we're asking. Sorry about that.

  5. clarissa
    Member
    Posted 7 years ago #

    To BPartch - I wanted to do exactly that - exclude some categories from my sidebar. However, when I included your code above, my categories displayed "None". Do you think you can help? Thanks!

  6. moshu
    Member
    Posted 7 years ago #

    Replace the 1, 2, 3, 4 with the ID# numbers of your own categories that you want to exclude.

  7. clarissa
    Member
    Posted 7 years ago #

    I already did that, but the result is still "No categories".

    And I apologize for asking this question twice. The other topic with my complete coding: http://wordpress.org/support/topic/79855

Topic Closed

This topic has been closed to new replies.

About this Topic