By default, your blog page is designed to show every post you publish. However, you may have some posts you don’t want people to see, and would prefer to hide them from your regular blog feed. Well, there is a hidden trick in Rainmaker that can filter your blog page to remove one or more categories of posts.
Video Instructions – click play below
To remove one or more categories from your blog page, we will need to know the ID of each category we want to remove. Once we have the ID’s, we can edit our blog page to add a ‘Custom Field’ that will specify the category ID’s we want to remove.
Follow the text instructions below.
1. Locate the ID of the Category that you want to remove from the blog page.
Navigate to ‘Content’ –> ‘Post Categories’ –> ‘Edit’.
On the right of the screen is the list of categories currently on your site. The ID is in the far right column of the list.
2. Once you have the category ID’s, navigate to ‘Content’ –> ‘Posts’ –> ‘View All’ and click on your ‘Blog’ page to edit it.
3. Click the ‘Admin Screen Options’ tab that appears in the top right of the screen, and check the box beside ‘Custom Fields’.
4. Scroll down under the main content area to the ‘Custom Fields’ box and click the blue ‘Enter New’ link.
5. Add ‘query_args’ (minus single quotes) into the ‘Name’ field. In the ‘Value’ field, add ‘category__not_in=XX’ (minus the single quotes) and replace XX with the ID of the category you want to remove. Click the grey ‘Add Custom Field’ button. The field will be added to the list of custom fields above.
6. Scroll back up to the ‘Publish’ box on the right of the editing area, and click the blue ‘Update’ button.
7. View your blog page to check that the correct posts have been removed.
8. To remove multiple categories of posts, adjust the value of the custom field to ‘category__not_in=XX&category__not_in=XX’ (minus the single quotes), replacing each instance of XX with the category ID. Repeat as needed. Update the page to save any changes.
9. To display posts from one category in your blog page, you can adjust the value to ‘cat=XX’ (minus the single quotes), where XX is the ID of the category you want to display on the blog page. Update the page to save any changes.
And you are done!