Forums

only show logged-in user's posts in Manage > Posts? (5 posts)

  1. jmp909
    Member
    Posted 3 years ago #

    Hi,

    We are using our WordPress site as a private blog for people to write about their experiences of a project. The problem is that in needs to be totally private. We've worked out that if the administrator publishes everything as private then the bloggers won't see each others posts.... however in their admin area they can see that there are other bloggers on there and can see the titles of their posts.

    If you login in and go to Manage>Posts then you can see the list of posts, which includes all the other bloggers, we want this to just show the (logged-in) blogger's own posts if possible.

    Any idea on how to do this?

    Thanks
    J

  2. mrmist
    Forum Janitor
    Posted 3 years ago #

    I've raised a ticket for this - it's #8111. Hopefully it will find its way into 2.7.

  3. jmp909
    Member
    Posted 3 years ago #

    thanks,

    although what i mean is that if i am logged in as a contributer (rather than an administrator), i only want to be able to see my own posts. This is essentially what appears in the "private" list.. but would need to be the same for all options ie "All Posts", "Pending Review", "Published" etc would only list my own posts.

    An administrator though would see what is there now.. ie all users.

    Maybe that's what you meant... I wasn't quite sure from your ticket

    regards
    J

  4. jmp909
    Member
    Posted 3 years ago #

    i'm guessing some adaptation of this code would do it:

    admin/edit.php
    $comments = $wpdb->get_results( $wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved != 'spam' ORDER BY comment_date", $id) );

    eg (pseudocode) where (author_id == logged_in_user_id) OR (admin==true)

  5. wrk
    Member
    Posted 3 years ago #

    hey use the following plugin 'manage-your-posts-only'

    This must help you, goodluck!

Topic Closed

This topic has been closed to new replies.

About this Topic