Shortcode in Woocommerce product short description

Posted in: Newspaper
Post count: 209

Hello,
I use a shortcode [warenkorbkurzbeschreibung] in the product short description of a Woocommerce product. When viewing the product page, this shortcode is executed and displays the date of a webinar:
https://www.literaturcafe.de/produkt/live-webinar-einfuehrung-in-papyrus-autor/

But when the product is displayed in the overview-page (post loop) the shortlink is not executed. See here:
https://www.literaturcafe.de/beitraege/

How can the shortlink be executed/replaced in this overview, so that the date is shown here, too?

Post count: 209

I tried this filter in functions.php, but without success:

add_filter('get_the_excerpt', 'do_shortcode');

Post count: 27744

Hello,

Unfortunately, you cannot add shortcodes to this section of the excerpt. This can only be done in custom.

Thank you!

Post count: 209

The shortcodes are executed in the product view. Could you point me in the direction where I have to change something to make shortcodes executed also in the overview (post loop?).
All filter solutions I found do not work in the Newspaper theme.

Post count: 27744

Hi,

This is a block made custom; if you want, you can use a standard block and set the shortcode in the element woo shortcode -> https://i.imgur.com/jNfv5Mh.png, and maybe then it will work.

Thank you!

Post count: 209

Hello Anamaria,
thank you very much, but this solution won‘t help me. This is a „normal“ shortcode defined in functions.php and it‘s not coming from Woocommerce. And I don‘t want to remove it, because it‘s perfectly executed in the shortdescription in the product view (see first link in first post).
I need a solution for executing shortcodes in the excerpts in the post loop. All the solutions with a filter don‘t work in Newspaper.
Greetings

Post count: 27744

Hi,

I asked the developers, and they said more should be done, including more investigation and implementation; this can be done only with custom work.

Thank you!

Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic.