Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Ultimate › How add character limit to 'short description'
- This topic has 7 replies, 5 voices, and was last updated 5 years, 3 months ago by WCFM Forum.
- AuthorPosts
- March 19, 2019 at 2:08 am #53380acauaferreiraParticipant
Hi ninja staff.
I would like to add character limit to ‘short description’
(this character limit will be added inside product manager , so the vendors cant write more than 50 words)
Max 50 words. - March 19, 2019 at 5:09 pm #53555WCFM ForumMember
HI,
Please use this code snippet –
add_filter( 'wcfm_product_manage_fields_content', function( $content_fields, $product_id, $product_type ) { if( isset( $content_fields['excerpt'] ) ) { $content_fields['excerpt']['type'] = 'textarea'; $content_fields['excerpt']['class'] = 'wcfm-textarea wcfm_ele wcfm_full_ele simple variable external grouped booking'; $content_fields['excerpt']['attributes'] = array( 'maxlength' => 50 ); } return $content_fields; }, 50, 3 );
Thank You
- September 10, 2019 at 11:09 pm #81111xolaParticipant
Hi, can you please guide me on how to add character limit for Product TITLE?
- September 15, 2019 at 12:46 am #81700WCFM ForumMember
Hi,
Please use this code snippet –
add_filter( 'wcfm_product_manage_fields_general', function( $general_fields, $product_id, $product_type ) { if( isset( $general_fields['pro_title'] ) ) { $general_fields['pro_title']['attributes'] = array( 'maxlength' => 10 ); } return $general_fields; }, 50, 3 );
You may change “maxlenght” value as per your requirement.
Thank You
- September 20, 2019 at 10:11 pm #82701r_guayaquilParticipant
Hi,
Is there a way for the product title to look like “Televisor Samsung 4k de 55 pulagadas…”, including the dots?
I want in the homepage and shop page the title look like that, but the vendors can add as many characters in the product title as the want.
Example:
The vendor adds the product title as “Televisor Samsung 4k de 55 pulagadas netflix youtube integrados”, but in the homepage and shop page the title looks like “Televisor Samsung 4k de 55 pulagadas…”Thanks for the help!
- September 22, 2019 at 1:26 pm #82910WCFM ForumMember
Hi,
Well, these displays are form theme template.
Please talk to your theme support for this, hope they have some option for this!
Thank You
- September 23, 2019 at 12:49 pm #83144zoltan.b.feherParticipant
Hi,
Shorten the excerpt snippet works well, however it puts a trailing <p> tag to the short description which overwrite the .product .box-excerpt IDs. When I edit it the short description I can delete the p tag, but when I edit later the product the <p> tag inserted again, which breaks the style. Do you have idea how to preserve the .product .box-excerpt selector?
- September 24, 2019 at 10:23 am #83346WCFM ForumMember
Hi,
Can you please show me screenshot for this?
Did you disabled “Rich Editor” for vendors?
Thank You
- AuthorPosts
- The topic ‘How add character limit to 'short description'’ is closed to new replies.