Web Development
Next.js
Subjective
Apr 26, 2013
How can you show description of a post in short?
Detailed Explanation
To add excerpt to a post,
1.Simply go to screen option of a post and select excerpt.
2.Call the following function to show the description in short.
Syntax:
When using the excerpt feature WordPress does not automatically provide a link to a page containing the full post. To generate a link include the following code in the loop directly below:
OR
Put the following in your theme's functions.php:
function excerpt_read_more_link($output)
{
global $post;
return $output . ' Read More...';
}
add_filter('the_excerpt', 'excerpt_read_more_link');
Discussion (0)
No comments yet. Be the first to share your thoughts!
Share Your Thoughts