• Resolved Azragh

    (@azragh)


    I followed this tutorial to be able to display post archives anywhere in pages, but still use the default template files of the theme: https://displayposts.com/2019/01/04/use-template-parts-to-match-your-themes-styling/

    Now I’m curious why Advanced Excerpt doesn’t work on the posts loaded with the [display-posts] shortcode. The shortcode loops over my main template files where the_excerpt() is used, so why isn’t it affected by Advanced Excerpt? It just shows the default one.

    Any help? ^^’

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author WPKube

    (@wpkube)

    Hi @azragh

    There’s 2 limitations applied. One is that it doesn’t get triggered on static pages “single post” and the other is that it only affects the main query.

    Those 2 limitations are there to avoid infinite loops and turning full content into excerpts.

    Since you’re going with your own code to output those posts, you can use the built in function the_advanced_excerpt.

    So, just replace the_excerpt(); with the_advanced_excerpt();

    Thread Starter Azragh

    (@azragh)

    Ah gotcha, that makes sense. Thx. =)

    I assumed that the selection of the_excerpt() in the “Filter” setting in the backend would be sufficient.

    Plugin Author WPKube

    (@wpkube)

    You’re welcome ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Possible to get it to work with “Display Posts Shortcode”?’ is closed to new replies.