Restrict Custom Category Template from Public (3 posts)

  1. Michael Moore
    Posted 4 years ago #

    I am using custom category templates to display different categories. One category needs to be restricted to only contributors and above, or, current_user_can('edit_posts'). Any post in this category, as well as the category page should not be visible to anyone that cannot edit posts. Normally, Capa Protect would do the trick, but it doesn't work with custom page templates, so im guessing thats why its not working with custom category templates. Thanks for any advice.

  2. Michael Moore
    Posted 4 years ago #


  3. esmi
    Forum Moderator
    Posted 4 years ago #

    I've not tried this but doesn't something really simple like:

    <?php if (have_posts() && current_user_can('edit_posts') ) : while (have_posts()) : the_post(); ?>


Topic Closed

This topic has been closed to new replies.

About this Topic