Created
March 27, 2016 22:48
-
-
Save awakekat/049e4f50beb2d5c37b44 to your computer and use it in GitHub Desktop.
Custom WP truncate words
This file contains 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
<p><?php | |
$content = get_the_content(); | |
echo wp_trim_words( $content , '45' ); ?> | |
<a href="<?php the_permalink(); ?>"> Read More</a></p> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment