How to hide a specific category?
This support request was posted in Flatbase by ThemeAvenue
- ThemeAvenue October 9, 2014 at 11:19 am
Hey there,
I’m really happy with the theme so far: ) I just switched from KnowHow to your theme.
I’d like to know how to hide a specific category called “hooks” (actually a sub-category) from the homepage & knowledge base page. The reason I’m trying to do this is because every articles in this sub-category are only targeted at developers (hooks for my plugin).
But, I still need to show a list of links to these articles in a specific article called “Available Hooks“. I tried using https://wordpress.org/plugins/list-category-posts/ but it does not seem to work with custom post types.
I’m using a child theme by the way. I hope you could provide me with a code snippet that I’ll use in my
functions.php
.Cheers
Juanfra Aldasoro October 9, 2014 at 5:32 pmHello,
Thanks for writing. Well, the knowledgebase is parsed by a function which has some nice hooks. What you can do is check if it is the home page, and then exclude the category.
Have you tried doing something like: https://gist.github.com/juanfraa/d5bcc9d3873e271259f2
Best,
Juan.ThemeAvenue October 13, 2014 at 3:34 amWorks perfectly thanks! Where can I find the documentation about the available hooks for FlatBase?
How about listing the articles for a specific categories? Do I need to create a shortcode to achieve this?
ThemeAvenue October 13, 2014 at 3:53 amForget about it. I simply used the following shortcode to list the articles for my category “hooks”: `[catlist post_type=article numberposts=-1 name=hooks]`
Juanfra Aldasoro October 13, 2014 at 2:37 pmThanks for the follow up 🙂
We’re building some new things that will include documentation. I hope we can have it soon.
Best,
Juan.
You must be logged in to reply to this topic.