WordPress.org

Support

Support » How-To and Troubleshooting » Hide specific category after using wp_list_categories

Hide specific category after using wp_list_categories

  • 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.

Viewing 1 replies (of 1 total)
  • 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.

Viewing 1 replies (of 1 total)
  • The topic ‘Hide specific category after using wp_list_categories’ is closed to new replies.
Skip to toolbar