Get the users that my following users are following

You can use the implode function to concatenate array elements: $get_the_following_users = get_user_meta($current_user->ID, ‘following_users’, true); $meta_qssuery = ”; //initialise to an empty string foreach ( $get_the_following_users as $following_user ) { $following_user = get_user_meta($following_user, ‘following_users’, true); if(!empty($following_user)) { //check if any data was returned $meta_qssuery .= implode(‘, ‘, $following_user).’, ‘; } } echo $meta_qssuery; This will … Read more

Custom registration and pending approval

Ok, I found a way to do it. It’s not a perfect solution but will allow me to continue the project. I just created another role called ‘shop_pending’. When the user registers as a shop, he won’t get the role ‘shop’, instead he will get the role’ shop_pending’. After all the process is done, the … Read more

Allow Users to Modify Some Values of Assigned WordPress Pods [closed]

You can use map_meta_cap() to set more specific capabilities for your CPT. So instead of using the built-in edit_posts and edit_others_posts capabilities you would create edit_locations and edit_others_locations – thus allowing a new custom role to edit their own locations, but not edit_others_locations. You may find this related question helpful: Using Custom Meta Capabilities on … Read more