Archived topic
Column Blog Layout Issue
5 replies · Started by Marco on March 22, 2019
Hello
I set up GP to show my posts in 3 columns - one of my blog posts' post format by accident was set as 'gallery' instead of 'standard' - in the column layout the full content was shown, text, gallery, etc. obviously throwing off the whole layout - is that the intended behavior??
Hi there,
Couldn't you just switch the post format back to standard since it was a mistake?
Or I'm missing something here?
Let me know :)
That's not the point, isn't it - I sure did switch the post format back for now but I still think that this behavior is probably not intended, isn't it?
That's actually intended, as the only way to show HTML (like a gallery) is to show the full content instead of the excerpt.
Let me know if you need any more info :)
Thanks Tom - is there a filter to avoid this behavior - in the past I just used the post format as an indicator and maybe use some different css for that specific post format - showing the full content in a e.g. 3 or 4 column layout is just not practical in my case but I guess that's just me then
For sure, try this:
add_filter( 'generate_show_excerpt', function( $show ) {
if ( 'gallery' === get_post_format() ) {
return true;
}
return $show;
} );