Is it possible to choose specific categories that will only be displayed to logged in members?
I tried to find a plugin or a PHP solution that does that but could not find anything that was still relevant.
Is it possible to choose specific categories that will only be displayed to logged in members?
I tried to find a plugin or a PHP solution that does that but could not find anything that was still relevant.
You must be logged in to post a comment.
Yes :).
The following will effect all queries for posts on the front-end including ‘secondary loops’ (e.g. post lists on the side) but it won’t effect custom post types. So this may not be exactly what you’re after, but the principle is the same:
You could try this if your looking to use it a loop type structure:
If you are looking to just display links to the category pages like a menu you can do this:
Use the WP nav menu feature. Register the menu in your functions.php
in your theme folder. You can do this by adding this to the file:
Add the categories to the menu via the administration.
Call it in your theme. This is similar to what we have done above but will just list it like a menu and not a post listing.