• Michael Moore

    (@imikedesigns)


    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Michael Moore

    (@imikedesigns)

    Anyone?

    esmi

    (@esmi)

    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(); ?>

    work?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Restrict Custom Category Template from Public’ is closed to new replies.