Replies
- Dandy Jefferson on June 17, 2016 at 8:11 am in reply to: [Resolved] Add separate landing page as WordPress Front Page #4291This reply has been marked as private.
- Dandy Jefferson on June 16, 2016 at 1:02 pm in reply to: [Resolved] Add separate landing page as WordPress Front Page #4271This reply has been marked as private.
- Dandy Jefferson on June 16, 2016 at 1:00 pm in reply to: [Resolved] Add separate landing page as WordPress Front Page #4270
Hi, Brajesh
Thanks a million. It works perfectly as I expected!Have a good day. Thanks.
- Dandy Jefferson on June 15, 2016 at 10:11 am in reply to: [Resolved] Add separate landing page as WordPress Front Page #4243This reply has been marked as private.
- Dandy Jefferson on June 13, 2016 at 2:29 pm in reply to: [Resolved] Add separate landing page as WordPress Front Page #4228This reply has been marked as private.
- Dandy Jefferson on June 3, 2016 at 1:19 pm in reply to: [Resolved] Hide Upper Right Menu at top bar #4090
Hi, Ravi
Thank you very much for the continued update. It works perfectly as I expected.Thanks. I will mark it as resolved.
By the way, I submitted a plugin suggestion about couple of days ago about notification function. If you get time, could you view that suggestion and see whether it’s worth to create it?
Thank you very much.
- This reply was modified 8 years, 6 months ago by Dandy Jefferson.
- Dandy Jefferson on June 2, 2016 at 8:44 am in reply to: [Resolved] Hide Upper Right Menu at top bar #4065
Hi, Ravi
Thanks for updated reply. I tried it but unfortunately, it still doesn’t work. I’m using a plugin to create the teacher and principal’s user role, it’s User Role Editor Pro, does it make any difference with default WordPress user role?
Thanks.
- Dandy Jefferson on June 1, 2016 at 1:53 pm in reply to: [Resolved] Hide Upper Right Menu at top bar #4060
Hi, Ravi
Sure.
function buddydev_remove_unwanted_menu() {global $wp_admin_bar;
/**
*
* either you can pass the capability or the user role like
* current_user_can(‘edit_posts’) with user capability
* current_user_can(‘author’) with user role
*
**/if ( current_user_can(‘teacher’) || current_user_can(‘principal’) ) {
//In my site, I want to hide teacher and principal’s edit and change avatar submenu
// place the node id you want to hide
$node_ids = array(
‘my-account-xprofile-edit’,
‘my-account-xprofile-change-avatar’,
‘my-account-xprofile-change-cover-image’
);foreach( $node_ids as $id ) {
$wp_admin_bar->remove_node( $id );
}
}
}
add_action( ‘wp_before_admin_bar_render’, ‘buddydev_remove_unwanted_menu’ );Thanks.
- Dandy Jefferson on June 1, 2016 at 1:33 pm in reply to: [Resolved] Hide Upper Right Menu at top bar #4058
Hi, Ravi
Thanks for reply. I tried it but it looks can’t work and return HTTP 500 Error…Thanks.
- Dandy Jefferson on June 1, 2016 at 9:28 am in reply to: [Resolved] Hide Upper Right Menu at top bar #4055
Hi, Ravi
Thanks for your help and code snippet. It works perfectly.However, I just wonder that is there any way to hide these items based on specific user roles? For example, if I only want to Role A to see these two items, but I don’t want Role B to see them, what can I do for that?
Thanks.