How to limit the number of characters in the vendor description?

How to limit the number of characters in the description? Some users write long texts and this spoils the page design.

Please try this code snippet, but replace β€œlisting” with β€œvendor” and remove the line related to β€œtitle” Change maximum length of title and description for listings #hivepress #listings Β· GitHub

1 Like

Thank you! This brought us closer to the goal, but now if the description exceeds the specified number of characters, it simply is not saved and is not displayed on the site. This only works if the user has made the description shorter than the limit.

Can you tell me how to add an error message so that the user understands that the text needs to be corrected? Will this be too difficult for you?

Hi,

Please provide more details on what exactly you mean, because this snippet limits adding more characters than it indicates, i.e. you cannot write anything if the limit is 10 and you entered 10 characters, for example.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.