The Excerpt introduced to WordPress after 0.71 version but it can control after 2.9 version and it refers to an optional summary or description of a post; that we can say, a post summary. Automatic excerpt which contains first 55 words of the post’s content will be displayed unless you do not provide an explicit excerpt to a post (in the post editor’s optional excerpt field).
The Excerpt has two main uses:
How to display excerpt in post/article:
if your current theme showing content only in blog post or article, remember the theme using wordpress content function to display it.
<?php the_content() ?>
Now, if you want to change it to show excerpt just replace the below code inside your post loop:
<?php the_excerpt(); ?>
If you want to use any conditional tags for showing excerpt in your category or archive post type just follow the below example:
<?php if ( is_category() || is_archive() ) { the_excerpt(); } else { the_content(); } ?>
How to change the limit & Tag for Excerpt:
Its pretty simple to change the default excerpt length in wordpress. Suppose you want to exceed your length to 100 words then paste the below code in function.php file.
Code:
add_filter('excerpt_length', 'new_excerpt_length'); function new_excerpt_length($length) { return 100; }
Right now, if you want add your own words to point the end tag of excerpt (default: [….]) paste the below code which will show ‘Read More Here….‘
add_filter('excerpt_more', 'new_excerpt_more'); function new_excerpt_more($more) { return 'Read More Here…'; }
That’s all. Further need any information regarding this issue just drop a comment in below. Hope our feedback satisfy your requirements. Thanks.
This post has already been read 3720 times!
What is Lead Capture: In general sense lead capture designates a process or way of…
Introduction Unlimited Modal POPUPS on MouseClick: Everyone knows about popup during site visits and most…
Brief about Pregnancy Calculator : This WordPress Pregnancy Calculator plugin allows users to display an…
Introduction About this Service Plugin: This Visual Composer Service Plugin works as an addon to…
Introduction of Dynamic Query String : This plugin allows user to set dynamic query string…
There is an occasional bug for iPhone and iPad even they are designed as well and…