Support

Account

Home Forums General Issues "Read more" in ACF text or wysiwyg field Reply To: "Read more" in ACF text or wysiwyg field

  • A non-JS option:
    Just swap out ‘company_detail’ for the name of your WYSIWYG field.
    And set/alter the length of the excerpt by changing the ’32’

    <p>
    	<?php
    		$raw_content 		= get_field( 'company_detail' );
    		$trimmed_content	= wp_trim_words( $raw_content, '32' );
    		$clean_excerpt		= apply_filters( 'the_excerpt', $trimmed_content );
    		echo esc_attr( $clean_excerpt );
    	?>
    </p>