WordPress.org

Ready to get started?Download WordPress

Forums

Role Scoper
[resolved] Make posts page private (2 posts)

  1. b-cat
    Member
    Posted 1 year ago #

    Love Role Scoper!

    One problem:

    I have created a separate News page (e.g., domain.com/news) and via Role Scoper I have restricted access to that News page to users that have logged in with the correct credentials.

    That RS restriction on that News page worked perfectly until...

    ...I designated that News page as the "Posts page" (via WP Settings > Reading Settings > Posts Page pull-down menu). Now, WP treats that News page as the location for displaying all Posts (which is what I wanted), but for some reason, WP has also now made the page public again, and anyone can view it regardless of login...?! (The RS restriction settings remain in place, they just have no effect now that WP treats the News page as the location for posts.)

    Is there a setting in RS that will restrict access to that designated posts page based on a user's login role? (I do not want to have to manually designate each individual post as public or private in the Posts menu. I just want the permissions/restrictions of that News page to control who sees the page.)

    Thanks for any advice!

    http://wordpress.org/extend/plugins/role-scoper/

  2. kevinB
    Member
    Plugin Author

    Posted 7 months ago #

    You're running into the flip side of an intentional design to make Role Scoper filter based on the actual query contents as opposed to the "framing" page.

    You can modify your theme code to suppress the output or redirect to a 404 page:

    if ( ! current_user_can( 'read_post', $your_page_id ) ) {
      // don't display the page content
    }

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic