Created
December 8, 2018 06:36
-
-
Save adamlaki/a2f70c9cbaf8c741c25a5f4f2ec8fa10 to your computer and use it in GitHub Desktop.
Trim Any Text In WordPress by Words With wp_trim_words()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="list-item"> | |
... | |
<p class="list-item__excerpt"> | |
<?php echo wp_trim_words( get_the_excerpt(), 25, '...' ); ?> | |
</p> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment