Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Ultimate › Add Product | product tags
- This topic has 5 replies, 2 voices, and was last updated 6 years, 3 months ago by WCFM Forum.
- AuthorPosts
- July 29, 2018 at 3:57 am #27063wwsAdminParticipant
Hello Team,
As you know there is product tags in add product page. Can we have some fixed tags which will be shown. or how to replace in most used tags.
Thanks
- July 29, 2018 at 5:37 am #27073WCFM ForumMember
Hi,
Yeah you can. Add this code to your site –
function wcfm_product_custom_fields_tag( $tag_fields ) { if( isset( $tag_fields['product_tags'] ) ) { $tag_fields['product_tags']['attributes'] = array( 'readonly' => true ); } return $tag_fields; } add_filter( 'wcfm_product_simple_fields_tag', 'wcfm_product_custom_fields_tag' );
Now, tag field is not editable and only way to select tags from “Choose from the most used tags”
Thank You
- July 29, 2018 at 6:36 am #27083wwsAdminParticipant
Hi,
Actually vendor can enter tags but i wanted some tags which should be fixed (always show). and is there any limit like we have in category ?
Thanks for the help.
- July 29, 2018 at 6:57 am #27091WCFM ForumMember
Hi,
OK, then don’t add that code.
Add this code to set default fixed tags at the time of add product –
function wcfm_product_custom_fields_tag( $tag_fields ) { global $wp; if( isset( $tag_fields['product_tags'] ) ) { if( isset( $wp->query_vars['wcfm-products-manage'] ) && empty( $wp->query_vars['wcfm-products-manage'] ) ) { $tag_fields['product_tags']['value'] = ''; // SET YOUR FIXED TAGS HERE } } return $tag_fields; } add_filter( 'wcfm_product_simple_fields_tag', 'wcfm_product_custom_fields_tag' );
But, there is no way yet to set limit. For textarea it’s not possible, hope you understand.
Thank You
- July 29, 2018 at 6:58 am #27093wwsAdminParticipant
Yes i understand thanks for the help really appreciate
- July 29, 2018 at 7:10 am #27098WCFM ForumMember
Thank you 🙂
- AuthorPosts
- The topic ‘Add Product | product tags’ is closed to new replies.