Using WP_TRIM_WORDS and THE_CONTENT
-
Hi All,
I’m trying to add content from a page using the following code
<div class="right-news"> <?php wp_trim_words( the_content, $num_words = 20, $more = null ); ?> </div>
I cannot use the_excerpt as I’ve set a length for this elsewhere of 8 words.
I want to show the first 20 words of the content in this particular area, but the code used above isn’t working.
Anyone spot the error?
Thanks
dvent
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Using WP_TRIM_WORDS and THE_CONTENT’ is closed to new replies.