If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #185276


    I am in final stages of completing our website and must say, that this theme and the theme support is awesome. I never regretted spending my money on enfold theme. But there is still one last thing I need to find out.

    I really need the ability to handle shortcodes in post sliders / grid layouts (within the excerpt). Each excerpt should e.g. start with an icon, but the excerpt just outputs the shortcode term for the icon. I tried the advanced excerpt plugin, which helps me display shortcodes inside the excerpts of blog elements, but is no help with any grid element.

    I did some research, but couldn´t find a solution. The topic that came closest to my question was this (Purchase code hidden if logged out) /”>http://www.kriesi.at/support/topic/ (Purchase code hidden if logged out) / – but the provided code didn´t work for me.

    I appriciate any help. Thanks!


    Hey StuWeTueHo!

    Edit config-templatebuilder > avia-shortcodes > postslider.php, find this code:

    $prepare_excerpt = !empty($entry->post_excerpt) ? $entry->post_excerpt : avia_backend_truncate($entry->post_content, apply_filters( 'avf_postgrid_excerpt_length' , 60) , apply_filters( 'avf_postgrid_excerpt_delimiter' , " "), "…", true, '');

    Replace it with:

    $prepare_excerpt = !empty($entry->post_excerpt) ? $entry->post_excerpt : do_shortcode(avia_backend_truncate($entry->post_content, apply_filters( 'avf_postgrid_excerpt_length' , 300) , apply_filters( 'avf_postgrid_excerpt_delimiter' , " "), "…", false, ''));

    This will increase the excerpt length. You should increase the “300” value for longer shortcodes.

    Best regards,


    Thanks for your reply Ismael,

    The code provided did fine, but somehow it only works with automatic generated excerpt. If I use the custom excerpt field at the bottom of each page / post, it still shows the shortcode term.

    But it is essential for me to work with custom excerpts.

    The strange thing: when I use a blog shortcode, everything works fine. This only happens with grid layouts. Any suggestion for that?



    I uploaded an example image for both manual and automatic excerpts. Dropcaps and icons get displayed perfectly, except with the combination of grid layout and manual excerpt …

    Enfold Excerpts

    • This reply was modified 2 years, 8 months ago by  StuWeTueHo.


    Please try following code instead

    $prepare_excerpt = !empty($entry->post_excerpt) ? do_shortcode($entry->post_excerpt) : do_shortcode(avia_backend_truncate($entry->post_content, apply_filters( 'avf_postgrid_excerpt_length' , 300) , apply_filters( 'avf_postgrid_excerpt_delimiter' , " "), "…", false, ''));

    It should work with custom excerpts too.

    Best regards,

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Display shortcodes in postslider / grid elements’ is closed to new replies.