-
Author
-
June 27, 2015 at 05:59 #65196amonroeParticipant
Hello,
I am using Kleo theme with a multi-vendor marketplace.
Vendors currently have some front end pages but also some limited back end access to add products. In the back end they only see their own media, products, orders, shop settings and profile settings.I am having trouble with the “add product” or “edit product” pages, however. The Kleo Theme Product Settings, Header Content, Bottom Content, Revolution Slider Options and Sidebar are NOT things that I want the vendors to have access to or alter in any way. Each product page needs to retain the uniformity… I do not want individual vendors to change the sidebar, header, anything at all. This is actually VERY important.
Could you please help me with this? How can I remove the options form the product pages in the back end? If I can, is there a way that Admin can still see these options in the back end but not the vendors? If not, that’s fine… I really don’t need these options on product pages as it is.
Any help is appreciated. Thank you.
June 27, 2015 at 16:31 #65234sharmstrModeratorWP has functions that allow you to control the display of meta boxes: https://codex.wordpress.org/Function_Reference/remove_meta_box
try this
COPY CODEif ( is_admin() ) { function remove_product_meta_boxes() { if( !current_user_can('manage_options') ) { remove_meta_box( 'mymetabox_revslider_0', 'product', 'normal' ); remove_meta_box( 'theme_product', 'product', 'normal' ); remove_meta_box( 'header_content', 'product', 'normal' ); remove_meta_box( 'bottom_content', 'product', 'normal' ); remove_meta_box( 'post_layout', 'product', 'side' ); // sidebar remove_action('edit_form_advanced', array('sidebar_generator', 'edit_form')); remove_action('edit_page_form', array('sidebar_generator', 'edit_form')); } } add_action( 'do_meta_boxes', 'remove_product_meta_boxes' ); }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
June 27, 2015 at 19:02 #65261amonroeParticipantI put this code in my child theme and it is working perfectly. Thank you so much for the help.
November 26, 2015 at 12:15 #89225samvParticipantPlease guide where to put this code , in which file and where in the file. Stuck here
November 28, 2015 at 06:10 #89717amonroeParticipantI put this code in my Kleo child theme’s functions.php file. It works perfectly.
November 28, 2015 at 12:05 #89746samvParticipantthanks amonroe ! community support is better then seventhqueen support!
November 28, 2015 at 12:46 #89747samvParticipantJust notice , visual Composer is showing in menu while vendor adding product , any guide how to hide this also from vendor pannel
November 28, 2015 at 17:34 #89805amonroeParticipant@samv: I’d be happy to talk with you more about WC Vendors over on their site (wcvendors dot com) and their forum. I can help you with this, as I had to do some removing of menu selections on the back-end myself, but I don’t want to keep posting about WC Vendors in SeventhQueen’s forum. 😉
I visit WC Vendor’s forum often so if you post there I’ll likely see it. The plugin devs are very helpful there also. -
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.