Created
April 15, 2018 11:40
-
-
Save mohiuddin3824/c145d25dfeef1034bdf1818fda3ccb45 to your computer and use it in GitHub Desktop.
How to make custom excerpt in WordPress
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
| function read_more($limit){ | |
| $post_content = explode(" ", get_the_content()); | |
| $less_content = array_slice($post_content, 0, $limit); | |
| echo implode("", $less_content); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment