WordPress.org

Ready to get started?Download WordPress

Forums

Admin/manage: can I hide other peoples posts? (3 posts)

  1. elyonline
    Member
    Posted 9 years ago #

    Hi,

    I would really like it if only the 'logged in user (non-admin)' could see their posts in managed instead of everyone elses as well.

    Is there a way to do this or a plug-in to do this?

    Thanks

  2. torio
    Member
    Posted 8 years ago #

    I am looking for this same answer and it seems to be a big secret? Let me know if you get the answer

  3. avineshb
    Member
    Posted 8 years ago #

    I had to do the same thing for a small internal project.

    This is the code I wrote in wp-admin/edit.php right after "foreach($posts_columns as $column_name=>$column_display_name)":

    <begin>
    $post_author_data = get_userdata($post->post_author);

    if ($wpdb->escape($_COOKIE[USER_COOKIE]) == $post_author_data->user_login || $wpdb->escape($_COOKIE[USER_COOKIE]) == "admin") {
    ...
    switch code
    ...
    }
    <end>

    Now the logged in user will only see their own posts. The admin user will also be able to see all posts (as long as the admin username is 'admin').

    Regards,
    Avinesh Bangar

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.