Support

Account

Home Forums General Issues Limiting the output of a custom field. Reply To: Limiting the output of a custom field.

  • I would recommend using the built in WP function wp_trim_words.

    <?php $excerpt = wp_trim_words( get_field('your_custom_field' ), $num_words = 50, $more = '...' ); ?>

    https://codex.wordpress.org/Function_Reference/wp_trim_words