Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Ultimate › Hide fields in edit page.
- This topic has 3 replies, 2 voices, and was last updated 4 years, 8 months ago by Sarmistha Chakraborty.
- AuthorPosts
- March 12, 2020 at 9:01 am #111277wpxpertParticipant
How to hide ‘product type’ and ‘product category’ field from product edit page.
This request only for edit page.How can i hide wcfm left column menu only for vendor.
- March 12, 2020 at 1:31 pm #111308Sarmistha ChakrabortyMember
Hello,
You need to override the “wcfm-view-products-manage.php” in your activate theme
<your theme folder>/wcfm/products-manager/wcfm-view-products-manage.php
then the conditionif(empty($product_id))
beforeif( apply_filters( 'wcfm_is_allow_category', true ) && apply_filters( 'wcfm_is_allow_pm_category', true ) )
andadd_filter( 'wcfm_product_manage_fields_general', function( $fields, $product_id, $product_type, $wcfm_is_translated_product, $wcfm_wpml_edit_disable_element ) { if($product_id != 0) { $fields['product_type']['class']='wcfm_block_hide'; } return $fields; }, 50, 5 );
Add this code to your child theme’s functions.php
In case you do not have child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/How can i hide wcfm left column menu only for vendor.
>>Can you explain with screenshot which section do you want to remove from vendorThanks.
- March 13, 2020 at 12:09 am #111387wpxpertParticipant
How can i hide wcfm left column menu only for vendor.
>>Can you explain with screenshot which section do you want to remove from vendorpls check attachment.
I need another help. how to remove sub categories and arrows from add product page? I want to display only main category.
Thanks
Attachments:
You must be logged in to view attached files. - March 13, 2020 at 12:32 pm #111425Sarmistha ChakrabortyMember
Hi,
.vendor-dashboard .wcfm_menu_toggler,.vendor-dashboard #wcfm_menu,.sub_checklist_toggler { display: none; }
Add this css to your child theme’s style.css
add_filter('wcfm_wp_dropdown_categories_args','fn_wcfm_wp_dropdown_categories_args'); function fn_wcfm_wp_dropdown_categories_args($args) { $args['parent'] = 0; return $args; } add_filter( 'body_class', function( $classes ) { $userid = get_current_user_id(); if(wcfm_is_vendor($userid)) { $classes = array_merge( $classes, array( 'vendor-dashboard' ) ); } return $classes; });
Add this code to your child theme’s functions.php
In case you do not have child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/Thanks.
- AuthorPosts
- You must be logged in to reply to this topic.