Site logo

Archived topic

Issue with displayposts shortcode.

2 replies · Started by Ryan on February 26, 2019

Viewing posts 1–3 of 3

I'm using the popular https://wordpress.org/plugins/display-posts-shortcode/ to add some posts on my homepage of my site. I notice that generatepress seems to add a <p class="read-more-container"> to the output of the displayposts shortcode just like it does with standard blog posts. This is fine except that it causes some invalid html the way it inserts the <p> tag inside the excerpt span. Would there be a way to stop the theme from adding this code to the displayposts shortcode output? Thanks!

Hi there,

I took a look at their code, and it looks like you should be able to do this:

add_filter( 'display_posts_shortcode_full_manual_excerpt', '__return_true' );

Adding PHP: https://docs.generatepress.com/article/adding-php/

Let me know :)

Thanks, I tried that in my functions.php and it didn't seem to have any effect. Would there just be a way to stop generatepress for adding the read-more-container to the output?

This archived topic is closed to new replies.