Support › General › How to limit the characters to display on front end
I'm using Oxygen builder and I have a custom field WYSIWYG (text) that I want to display on front end but I need to limit the number of characters to display.
I'm aware I'll need a function to get the field value and output the value with character limit but I don't know how to apply all of this on Oxygen builder.
I've searched on the forum but couldn't find what I'm looking for.
Can you guys help me here?
I really appreciate it!
I forgot to tell that I'm using a repeater to get a custom post type "News" with the mentioned custom field and other fields too like a photo.
When outputting the field value with code, you can use the WordPress function wp_trim_words() to trim text to a certain number of words or use the PHP function substr() to return a number of characters.
Read more on the documentation https://docs.metabox.io/fields/wysiwyg/#template-usage
If you use the Oxygen builder, you can contact their support to get further assistance.