Generally we display our content using "the_content();". But this displays entire content in Post or page.
To restrict this without using complicated code, Use the below code
$rest_content = the_content();
$content_result = substr($rest_content,'0','200') // 200 specifies the characters to display
echo $content_result;
To restrict this without using complicated code, Use the below code
$rest_content = the_content();
$content_result = substr($rest_content,'0','200') // 200 specifies the characters to display
echo $content_result;
No comments:
Post a Comment