I'm trying to limit the display of the content to authors and need to make specific pages viewable by everyone (i.e Dashboard / Data entry ...) Any suggestions on how to add specific rules to display specific pages to all logged-in users?
Thanks a bunch
//limit post display to post authors (excludes admins)
function shapeSpace_set_only_author($query) {
global $current_user;
if (!current_user_can('manage_options')) {
$query->set('author', $current_user->ID);
}
}
add_action('pre_get_posts', 'shapeSpace_set_only_author');