Tag Info

New answers tagged


You can add this to your functions.php file in your template to allow the user to edit pages that they have created. Just specify their $user_id (i.e. 27): //to add capability to $user_id $user = new WP_User( $user_id ); $user->add_cap( 'edit_pages' ); $user->add_cap( 'edit_published_pages' ); You can find a specific user's $user_id from the URL ...


Try this code: (edited code a little) add_action( 'template_redirect', 'my_page_template_redirect' ); function my_page_template_redirect() { global $post; if( is_user_logged_in() ) { if( is_single() ){ if( $post->post_author != get_current_user_id() ){ wp_redirect( 'IN ANY PAGE' ); } } ...

Top 50 recent answers are included