If everything else is doing what you want, change this line:
$categories = get_categories('hide_empty=0');
To this:
$categories = get_categories('hide_empty=0&exclude=10');
Swap ’10’ with the category number you want to exclude.
Related Posts:
- Better way to exclude category output for post/pages?
- Exclude Categories from wp_list_categories()
- List post wit the same category but exclude parent
- Display 1 category only with get_the_category (by ID or slug)
- Get first category only and excluding one
- exclude category from get_posts?
- Exclude the category from the WordPress loop
- Exclude certain category from latest updates
- Exclude categories from Loop, queries, widgets, post navigation
- List posts by category exclude current post
- wp_list_categories exclude not working
- How to filter by category in REST API, excluding posts also in other category term?
- Exclude Tags from get_the_tags
- Excluding a category from next and previous post links
- is there a quick way to hide category from everywhere?
- Exclude Category From Home Page, Display Posts on It’s Own Page?
- How to exclude categories from recent posts, recent comments & category widgets?
- Exclude a category from the filed under list only on some templates
- How to set post expiration date and time and move the page to archive after expiration [closed]
- How to exclude posts from a category when using this particular format
- Exclude category from Tag Template
- exclude post from displaying in loop if it is in a category, but not in many categories
- I need to create a search form that will display search results from specific category
- Exclude Posts From Specific Category from Next and Previous post links
- Query Posts Exclude Entire Category
- exclude categories from search results
- Exclude category from fucntion
- WordPress category widget only show categories with children
- Exclude Category filter from Portfolio section
- Multiple arrays in post__not_in parameter
- Excluding posts not working
- wp_list_pages() exclude category
- Include posts from some categories while excluding from others
- Loop doesn’t exclude the specified category in home page
- How do I remove a category from a wordpress loop>
- Exclude category from query
- Functions.php: Exclude Category from “Blog”
- Exclude Category ID in function
- Woocommerce filter function not updating
- How to get post with slug and exclude categories
- wp_list_categories not excluing multiple ids
- Exclude post category in a blog page
- How to exclude posts from category posts count
- Exclude category from foreach loop
- Have posts that belong to multiple categories, exclude some categories from homepage
- Exclude all subcategories in the_category (post)
- Exclude some categories from the post page
- Exclude category from get_the_category
- I need to exclude from a query a category and a few custom taxonomies
- Exclude categories by ID
- Don’t execute function on specific posts
- WooCommerce Hiding A Certain Category From Being Displayed On Single Product
- using pre_get_posts to exclude
- Homepage custom recent news
- problems exluding categories
- Exclude the category in WordPress
- How can I exclude a category from the main loop with the category name & not ID?
- User level categories
- Exclude category from drop down list form
- Disable the link on certain pages
- exclude certain categories form archive widget
- Exclude Woocommerce Product Category From Sitemap
- How to remove an item from a custom Walker_Nav_Menu
- Exclude a category and post_type from wp_query
- Exclude category and post from loop in custom category.php
- How can I exclude a particular category from my WordPress Page 1 and Page 2?
- Excluding category from post navigation in WordPress?
- post__in and tag__not_in conflict
- Exclude category from WP_Query args not working
- Displaying Category in sidebar post widget but not in the loop on home
- How to exclude one category
- How to exclude a category in the following Code?
- Category menu that filters out empty categories
- trouble with my loop
- Problems with explode [closed]
- Exclude Category From Home Page, Display Posts on It’s Own Page?
- How to have a category not show up in query post with page panigation?
- Customize category query in widget
- Exclude a ‘portfolio’ custom category?
- Call function on a single page
- Excluding cateory not working on my site. how to solve this? [closed]
- How to define category ID in an array?
- hide particular category post from front page only [closed]
- Exclude a category ID from the following function
- How to display only 3 main categories, separated by commas, since they are marked in the post?
- Problem displaying one post from each category
- Deleted category by mistake, all posts now have categorized category. Can i revert that?
- Complex Category selection as per user input
- WordPress link to post links to category (loop)
- Display all product tags associated with a specific product category
- what file I need to create to work date archive links?
- How to display a single(current) post from a category
- Ajax Category add doesn’t update the list table custom column
- how to get postmeta info based on multiple categories?
- query.php – multiple is_category functions
- Is it possible to setup Category wise Subsciption?
- Exclude Authors based off date of last post
- What method would I use to show an image in between X amount of posts on category archive? [duplicate]
- Remove /category/ from category (archive) page URLs (without using a plugin)
- How to make category for word post_content