Archived topic
Blog Layout - Showing Full Post Instead of Excerpt
5 replies · Started by Sankalan on September 8, 2020
I am wondering why the blog layout (archives and homepage) is showing the full text even when I am selecting "excerpt." Default WordPress setting is also set to excerpt instead of full text.
Hi there,
Are you talking about the front page?
I just checked and it's not showing the full post.
Looks like you are using the custom excerpt metabox?
https://www.wpbeginner.com/plugins/add-excerpts-to-your-pages-in-wordpress/
If so that overwrites the excerpt option in the customizer as that's its purpose.
If you remove the content in the metabox, the default word count excerpt should show.
Let me know if this helps :)
You did not see the full post because I added a "Read More" tag. That prevented it from showing the full post on archive pages.
Adding a custom excerpt or removing it doesn't make any difference. I have now removed the custom excerpt and even the "Read More" tag. In the customizer, I have set the option to excerpt. And yet, it is not resolved!
You are using an image post format.
Try using standard instead;
https://www.wpbeginner.com/glossary/post-formats/
If using image post format was intended, then you need this PHP snippet:
add_filter( 'generate_show_excerpt', function( $show ) {
if ( 'image' === get_post_format() ) {
return true;
}
return $show;
} );
Adding PHP: https://docs.generatepress.com/article/adding-php/
It worked. Thanks!
No problem :)