about visibility in wordpress regarding of roles

I’ve tried several times download the photos locally but still could not see them as subscriber on my website. Also, even so I could see the photos as admin, I could not as admin to comment them. Eventually, I’ve deleted the folder with all photos on my server provider and uploaded the new photos. After … Read more

How do you make a custom post type invisible for subscribers

register_post_type() accepts a parameter capabilities in its arguments. See get_post_type_capabilities() for possible values. you can add these settings in your code while registering the custom post type ‘capabilities’ => array( ‘edit_post’ => ‘update_core’, ‘read_post’ => ‘update_core’, ‘delete_post’ => ‘update_core’, ‘edit_posts’ => ‘update_core’, ‘edit_others_posts’ => ‘update_core’, ‘delete_posts’ => ‘update_core’, ‘publish_posts’ => ‘update_core’, ‘read_private_posts’ => ‘update_core’ ),

How do I restrict a second admin certain access?

I think this code will prevent certain users from getting into any part of the admin area (not tested): add_filter(‘admin_menu’, ‘block_users’); function block_users() { $current_user = wp_get_current_user(); // get current user object $allowed_user=”[email protected]”; // change to allowed user email if (! $current_user->user_login == $allowed_user) { wp_redirect(admin_url()); // redirect to dashboard exit; // to exit this … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)