WordPress.org

Ready to get started?Download WordPress

Forums

Manage only your own posts (4 posts)

  1. jzpchen
    Member
    Posted 8 years ago #

    Currently in Manage menu, you will see all posts from all users of your blog. Some you can only view and some you can view, edit, and post, for example. Is it possible to configure so that roles that are less than, say Editor or Admin, you can only see your own posts.

  2. jzpchen
    Member
    Posted 8 years ago #

    If I changed the core code, I seems to get what I need. I will see how to do it in a pluggin fashion. Here is what I did in wp_admin/edit.php:

    $what_to_show = 'posts';
    $posts_per_page = 15;
    $posts_per_archive_page = -1;
    // begin added code: role editor and admin can see others
    if (!current_user_can('edit_others_posts'))
    $author = $user_ID;
    // end added code
    wp();

  3. moshu
    Member
    Posted 8 years ago #

    Did you try the Role Manager plugin?
    http://redalt.com/wiki/Role+Manager

  4. jzpchen
    Member
    Posted 8 years ago #

    Moshu, thanks. I installed the Role Manager. It is a great tool. However, it doesn't control the listing of posts in Manage. I think the question is why there is a need to display posts that a user cannot edit in Manage. If someone only need to view a post, they should go the "home"; there all the posts are for viewing.
    There is action you could add pre fetching the posts. But I don't know how to get the Manage context so that I will only change the pre fetching for listing in Manage. It seems to me an action will be desirable at here I changed the code in edit.php.

Topic Closed

This topic has been closed to new replies.

About this Topic