How to use substring() function with the_content() in worpress?
I am using this code;
<?php echo substr(the_content(), 0, 5) ?>
but code is not working.
- 6 years ago
You can use this code:
$content = get_the_content();
$content = strip_tags($content);
echo substr($content, 0, 20);
We have hands on developing in making innovative and powerful Applications about Website and Android App, VBage Tech offers advancement system which saddle to your digital appearance and grow.
To review your digital appearance through commercial website and Mobile application and help you to improve in digital appearance.