• Resolved trivum

    (@trivum)


    I’ve looked around for this, but I can’t find what I need.

    Is there a plugin that will limit a user so that they see only the posts that they made in the backend?

    As it stands, when they go to manage posts, it seems that they see all the posts that all the users have made, however they can only edit their own, of course.

    I’m trying to make it so that they only see their own posts in the backend.

    Thanks in advance for any suggestions.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter trivum

    (@trivum)

    Anyone with ideas for this?

    Thanks.

    Might look at https://www.coppit.org/code/ Category Access plugin for lack of anything else.

    There is the Role Manager Plugin (see Resources at Roles and Capabilities).

    Thread Starter trivum

    (@trivum)

    Thanks for the suggestions.

    I already use the Role Manager, and that doesn’t quite do it.

    I checked out the other plugin, and that doesn’t do it either. It seems to limit what they can read on the frontend, not on the backend.

    Unfortunately, I don’t know how to write the code, but I think I can figure out how to do. Someone can correct me if I’m wrong.

    It seems you could check to see the user’s permission level, and if they didn’t have permission to edit other’s posts, you would return only the posts written by them in the Manage Posts section.

    It seems simple enough to me, but then, as I said, I don’t know how to code. For those who know about these things, would this be a simple plugin to make?

    Thread Starter trivum

    (@trivum)

    OK, I just noticed something that I hadn’t before. When I’m logged in as Admin, I can filter the Manage Posts by Author, however when I log in as a contributor, that filter isn’t an option.

    So at least it seems that filtering out all the other authors completely is very possible (especially with a plugin, which is what I’m hoping for).

    It’s a little puzzling to me why the default for someone in a contributor’s role would be to see all the posts on the blog rather than just their own. If they can’t edit those posts, I can’t see why they should be presented with them. They only have to wade through them to find their own.

    Thread Starter trivum

    (@trivum)

    Finally found an answer to this on this thread.

    There are two suggestions. The first didn’t work for me, but the second one did.

    It also looks like the code has changed a little since that answer, so I just copied the end of the new code into the replacement code, although the orignal replacement code also worked.

    I’ll go ahead and give the solution that worked for me.

    Go to wp-admin/edit.php and find the lines

    wp
    ("what_to_show=posts$post_status_q&posts_per_page=15&order=$order&orderby=$orderby");

    You can delete that, or even better just comment it out so that it’s still there if you need to change things back. You can comment it out by putting /* at the beginning and */ at the end so that it looks like this:

    /*wp("what_to_show=posts$post_status_q&posts_per_page=15&order=$order&orderby=$orderby");*/

    Now put in the new replacement code:

    $thisauthor='';
    if (!current_user_can('edit_others_posts'))
    $thisauthor = '&author=' . $user_ID;
    wp('what_to_show=posts&posts_per_page=15&order=$order&orderby=$orderby' . $thisauthor);
    Thread Starter trivum

    (@trivum)

    An update on this code. It should be the following:

    $thisauthor='';
    if (!current_user_can('edit_others_posts'))
    $thisauthor = '&author=' . $user_ID;
    wp("what_to_show=posts$post_status_q&posts_per_page&=15&order=$order&orderby=$orderby" . $thisauthor);

    Why it changed.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Plugin To Limit What User Sees?’ is closed to new replies.