I am using the Genesis Responsive Slider. I am using posts to show the images in the slider. I put those posts in their own category (slider). I want to hide that category (or blog posts in that category) from showing up on my blog page.
Is this something that can be done with Simple Hooks? I don’t really want to add another plugin.
You can do this several ways.
Use CSS to hide all posts using that category.
Install a plugin and exclude posts in that category from displaying on your blog or home page.
Add some PHP code to your child themes functions.php file and edit the post i.d for that category you want to exclude with a conditional tag for the blog page.
I’ve actually written another post about 5 ways to do this but you may just want the code:
Replace the 32 with the tag i.d for the category you want to exclude from your homepage.
You can also change the conditional tag if needed.
I was feeling scared to touch the PHP ever since that one time. At band camp. Okay, it wasn’t band camp. I just touch the PHP once and killed a site. So I am leery.
To get around this I decided to change the slider to use Pages instead of Posts because I don’t have to show all the pages on my site.
I appreciate your help!
Understand. I did test this code so i know it works and shouldn’t kill your site if you copy the raw version of the code.
Thanks you for this post! helped me, easy fix!
You must be logged in to reply to this topic.
Are you a blogger, web designer, developer, or website owner looking to generate more income?
Promote products for the largest and fastest growing online website platform as part of our affiliate program.