This topic has 7 replies, 3 voices, and was last updated 9 years by amonroe.

  • Author
  • #65196
     amonroe
    Participant

    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.

    #65234
     sharmstr
    Moderator

    WP has functions that allow you to control the display of meta boxes: https://codex.wordpress.org/Function_Reference/remove_meta_box

    try this

    COPY CODE
    
    if ( 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 solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #65261
     amonroe
    Participant

    I put this code in my child theme and it is working perfectly. Thank you so much for the help.

    #89225
     samv
    Participant

    Please guide where to put this code , in which file and where in the file. Stuck here

    #89717
     amonroe
    Participant

    I put this code in my Kleo child theme’s functions.php file. It works perfectly.

    #89746
     samv
    Participant

    thanks amonroe ! community support is better then seventhqueen support!

    #89747
     samv
    Participant

    Just notice , visual Composer is showing in menu while vendor adding product , any guide how to hide this also from vendor pannel

    #89805
     amonroe
    Participant

    @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.

Viewing 8 posts - 1 through 8 (of 8 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?