WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to allow a user only to see and edit one single page in the backend.

user 1 can edit and see page #20
user 2 can edit and see page #21

The other pages, posts, settings can not be entered, seen or edited by these users.

any ideas?

In the frontend everyone of these users has one page. It is for a customer who has 20 customers who should have their own personal page.

share|improve this question

You can enhance the query for backend. The follow source add the user id to the SQL selct for list posts and remove all posts, there are from other user IDs. List only the posts from the logged in users. But the administrator have full access, he is exclude from this enhancement.

add_filter( 'posts_where', 'fb_add_posts_where' );
function fb_add_posts_where( $where ) {

    if ( ! is_admin() || current_user_can( 'administrator' ) )
        return $where;

    $current_user = wp_get_current_user();
    $where .= ' AND post_author = ' . $current_user->ID;

    return $where;

You can enhance this example for much more requirements.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.