Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM › Manipulating WCFM Menu Bar
- This topic has 3 replies, 3 voices, and was last updated 6 years, 8 months ago by Bingal.
- AuthorPosts
- March 13, 2018 at 6:02 am #20241JayGuest
Hi,
I would like to change some of the menu names (eg. Payments -> Earnings), and delete/hide menu (eg. Payments – hide for staff; Logout – hide/delete for every role) from WCFM menu bar.
I could not find section for hiding “Payments” in Capability Settings.
Could you provide child theme functions.php code for this?
Thank you!
- March 13, 2018 at 8:26 am #20244WCFM ForumMember
Hi Jay,
Here is code for manipulating over menu items –
function wcfm_withdrawal_menu_manipulate( $wcfm_menus ) { if( isset( $wcfm_menus['wcfm-payments'] ) ) { $wcfm_menus['wcfm-payments']['label'] = __( 'Earnings', 'wc-frontend-manager' ); if( function_exists( 'wcfm_is_staff') ) { if( wcfm_is_staff() ) unset( $wcfm_menus['wcfm-payments'] ); } } return $wcfm_menus; } add_filter( 'wcfm_menus', 'wcfm_withdrawal_menu_manipulate', 100 );
Now, “Logout” is not part of menu items, have to hide this using CSS, use this –
#wcfm_menu .wcfm_menu_logout { display: none; }
Please know is this works for you or not!
Thank You
- March 13, 2018 at 10:30 pm #20314JayGuest
Thank you for your help. It works!
- March 14, 2018 at 4:51 pm #20328BingalMember
Welcome 🙂
If you ever get a chance then please add a review for me – https://wordpress.org/support/plugin/wc-frontend-manager/reviews/
Thank You
- AuthorPosts
- The topic ‘Manipulating WCFM Menu Bar’ is closed to new replies.