WordPress.org

Ready to get started?Download WordPress

Forums

Hide specific category after using wp_list_categories (2 posts)

  1. henryz
    Member
    Posted 5 years ago #

    I am using <?php wp_list_categories('orderby=name&title_li'); ?>

    I need to hide a category from this list called 'portfolio', how can I go about this?

    I am also using <?php wp_get_archives('title_li=&type=postbypost&limit=5'); ?> For my recent posts and I need to hide all posts within the 'portfolio' category.

    Basically cut off this category completely from everywhere, unless you visit the archive page directly.

    Thanks.

  2. asechrest
    Member
    Posted 5 years ago #

    See this section in the codex for wp_list_categories. Determine the category ID of "portfolio" by going to the categories page in the back-end and hovering over this category. Look in the status bar of your browser and the cat ID will be listed at the end of the URL.

    And see if this thread helps for exluding a category from wp_get_archives.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.