Viewing 22 posts - 1 through 22 (of 22 total)
  • Author
    Posts
  • #251015

    Hi, my name is Egon, i love your theme ENFOLD, it is really very easy to use and works very fine.

    I only have one question: I would like to show an shortcode in the excerpt of the theme. But if i put the shordcode “[wpc_countdown targetdate="2014-05-08-10-15-59"]” into it i will not work. It only shows up the text.

    I’ve tried to place the “add_filter(‘get_the_excerpt’,’do_shortcode’);” filter to the functions.php, but als soon as i saved it the page does not longer show, the browser stais white.

    How can i manage to get it run?

    Thank you in advanced for your reply, yours Egon.

    #251089
    This reply has been marked as private.
    #251096

    Hey!

    Thank you for using the theme!

    Please edit the post then look for Screen Options. Enable the excerpt metabox. Use it to specify the excerpt of the post along with the shortcode. I hope that it works.

    Regards,
    Ismael

    #251103
    This reply has been marked as private.
    #251104

    Hey!

    My bad! I didn’t notice that you’re using the blog grid style. Please edit config-templatebuilder > avia-shortcodes > postslider.php. Find this code on line 311:

    $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 this:

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

    That should enable the shortcodes on blog grid excerpts.

    Regards,
    Ismael

    #251106
    This reply has been marked as private.
    #251110
    This reply has been marked as private.
    #251167

    Hi!

    I’m sorry but it is working on my end. Maybe, you didn’t paste the code correctly. Can you please post the code on line 311 here?

    Regards,
    Ismael

    #251171
    This reply has been marked as private.
    #251174
    This reply has been marked as private.
    #251176
    This reply has been marked as private.
    #251179
    This reply has been marked as private.
    #251181
    This reply has been marked as private.
    #251463

    Hi!

    Thank you for the update.

    Please ignore the suggestion about the Screen Options > Excerpt metabox then do the changes above on line 311. Place the shortcode on the text editor. This is what I have on my end when I use the icon shortcode:

    Since you’re using a third party plugin’s shortcode, please contact the plugin author. Thanks!

    Cheers!
    Ismael

    #251996
    This reply has been marked as private.
    #252400

    Hi!

    1. Have you tried setting a manual excerpt?

    2. You can set that in the Header options at the right when editing the Page:

    Best regards,
    Josue

    #252527
    This reply has been marked as private.
    #252630
    This reply has been marked as private.
    #253943

    Hey!

    Excerpts in WordPress do not support shortcodes so you need to enable it on that specific selection as Ismael indicated above and as you mentioned you had working. You’ll need to go back and re-enable them on that file each time you update the theme.

    Cheers!
    Devin

    #254258
    This reply has been marked as private.
    #254421

    Hi!

    Sorry for the confusion.

    Please edit the same line on postslider.php that we suggested above. Replace the code with this:

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

    This should allow the shortcode but since it is also calculating the shortcode as excerpt, you might want to increase the avia_backend_truncate string limit from the default 60 to 150 or more.

    Cheers!
    Ismael

    #255059

    Thank You very very much, you guys are incredible.

    Everything worked out fine now,

    perfekt theme, perfect support. I will buy again!!!

    Sencerely yours Egon

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

The topic ‘Shortcode does not work in excerpt’ is closed to new replies.