Limit words displayed in $content
-
Hi there,
I am trying to work out how to limit the amount of words being pulled through when I use $content.
My code looks like this:
<?php $page_id = 89; $page_data = get_page( $page_id ); $title = $page_data->post_title; $content = $page_data->post_content; echo '<h5>' . $title . '</h5>'; echo $content; ?>
I am trying to make it only display approx. 100 words without using excerpt etc. so as to not rely on my client to understand the <more> function.
Any help appreciated, Thanks.
Phillustration
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Limit words displayed in $content’ is closed to new replies.