Is there a way to restrict the amount of text goes into the short description when a user inputs to it? Most of my users seem to put all the content in the short description rather than the long one.
Also on user input, is there a way for them to edit the event? I went throught the process as a user, and once i submit it, i can't edit it?
Hi,
Is there a way to restrict the amount of text goes into the short description when a user inputs to it? Most of my users seem to put all the content in the short description rather than the long one.
Also on user input, is there a way for them to edit the event? I went throught the process as a user, and once i submit it, i can't edit it?
Hi,
Add following filter in your theme functions.php file at the bottom:
/* Limit event short description text */ add_action('stec_insert_post', function($data) {
if ('stec_event' !== $data['post_type']) {
return $data;
} // Config
$max_words = 5;
$more = '...'; $data['post_excerpt'] = wp_trim_words($data['post_excerpt'], $max_words, $more); return $data;
});
Stachethemes Developer