WordPress roles – Protect administrator role
Install User Role Editor Plugin Create a Role for them assign everything except removing admin.
Install User Role Editor Plugin Create a Role for them assign everything except removing admin.
I had the same problem, a custom role couldn’t assign categories to my CPT. When doing register_taxonomy(), I added these capabilities: ‘capabilities’ => array ( ‘manage_terms’ => ‘manage_options’, //by default only admin ‘edit_terms’ => ‘manage_options’, ‘delete_terms’ => ‘manage_options’, ‘assign_terms’ => ‘edit_cpt-type’ // can edit cpt-type i.e. custom role ), Hope this helps to people and … Read more
This can be solved using custom meta fields in the user profile (only visible to administrators) and then making an individual dashboard widget containing this meta (only visible if certain criteria is met). Adding fields to the user profile page can be done: 1) manually Following Justin Tadlock’s tutorial: Adding and using custom user profile … Read more
You have to do various things. But you can change the hook the Ultimate Member uses. They Use the Validation class. But keeping your need in mind, you can bypass the use of this class. This is the solution I think will work remove_action( ‘um_submit_form_register’, ‘um_submit_form_register’, 10 ); Now we will register new method. add_action( … Read more
function is_user_a_member_of_this_group($user_id, $group_id) //return: bool return groups_is_user_member( $user_id, $group_id ); }
Fiddling with user roles would probably be the most robust solution, however a quick and dirty approach would be to set post meta-data to mark posts that should be hidden, then add a meta-query to post queries by using a pre_get_posts hook in order to restrict results to non-hidden posts for non-logged-in users. The following … Read more
I had to do something similar. What you need to do first is in each of your config files define the table prefix … make sure that they are different. Example: WordPress installation 1: wp123_ WordPress installation 2: wp124_ Your first installation would be your main installation the one with the user table you want … Read more
Membership plugin from Wpmudev.org should fit your needs: http://premium.wpmudev.org/project/membership/ This is step 2 of the registration process with Membership: EDIT: According to comments that membership should give access to certain custom post type i would suggest this: Create a template for that custom post type as single-premium-videos.php More info: https://codex.wordpress.org/Post_Types#Template_Files Then add a check if … Read more