How do I exclude categories from displaying on a blog page?
To exclude multiple categories from showing up in the WordPress blog page, simply add all of the categories ID in the same line from the code above (line 3) separated by a space as per the example below. $query->set(‘cat’, ‘-124 -125 -126’); The example code above would exclude the categories with ID 124, 125 and 126.
How do I remove categories from blogger?
Easy Steps to Exclude Category from Blog Page Then open Appearance >Editor tab on the left of the Dashboard to access your theme editor. Select the theme you’re using from the dropdown menu and locate functions. php file to exclude category from blog page.
How to exclude a category from a WordPress page?
To exclude multiple categories from showing up in the WordPress blog page, simply add all of the categories ID in the same line from the code above (line 3) separated by a space as per the example below. $query->set(‘cat’, ‘-124 -125 -126’); The example code above would exclude the categories with ID 124, 125 and 126.
How can I exclude posts from my home page?
The easiest way to exclude posts from the homepage is of course using a plugin (if your homepage is setup to display latest posts). One of the currently best rated plugins for this is called WP Exclude From Homepage which allows you to exclude categories, tags, posts of even pages from the homepage without breaking pagination.
How to find the category ID in WordPress?
To find your category ID, follow the steps below: 1 Login to WordPress Dashboard 2 From Posts menu click on Categories 3 Hover over the category you would like to hide 4 At the bottom of the page you can see the URL and ID
How to add categories to your WordPress home page?
We can use the WP_Query function itself to customise what posts are called and subsequently displayed on our home page, blox index or archives (e.g. category, date and tag archives). Alternatively, we can use the function query_posts to alter the main loop.