Forum Replies Created
Viewing 2 posts - 1 through 2 (of 2 total)
- AuthorPosts
- June 22, 2019 at 11:26 pm in reply to: Deactivate the WCFM sidebar menu only in non administrator accounts #69082darq royaParticipant
Perfect ing.rapparini you are a genius, that’s what I was looking for, thank you very much!
June 20, 2019 at 6:05 pm in reply to: Deactivate the WCFM sidebar menu only in non administrator accounts #68781darq royaParticipantHi!
I see that the answer is not as simple as I thought, it’s been almost 2 days and nobody has answered I guess I’ll have to implement some ingenious solution to disable the wcfm sidebar using CSS and get the role using something similar to this that I got :
function get_current_user_roles() { if( is_user_logged_in() ) { $user = wp_get_current_user(); $roles = ( array ) $user->roles; return $roles; // This returns an array // Use this to return a single value // return $roles[0]; } else { return array(); } }
Thank you very much for the effort.
- AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)