Site logo

Archived topic

Creating several shortcodes for use with Elements

3 replies · Started by Ola on January 4, 2023

Viewing posts 1–4 of 4

Hi!

Sorry if this is a bit "off-topic" ...

Basic usecase: I want to insert text/blocks into a blog article (as generic promos of other articles or products). The "generate_after_content" hook is too far down, below post meta, navigation and a social sharing plugin (social snap). I'd like to be able to use different texts for different posts and sometimes two shortcodes in the same post.

I've implemented the shortcode-to-hook connection as described in https://generatepress.com/forums/topic/hook/#post-1038253

If I want to add more shortcodes to use simultaneously in same or different articles, should I duplicate the script in the linked post or would the code be different?

Thanks for awesome support!

/Ola

Brilliant!

Thanks!

Glad to be of help

This archived topic is closed to new replies.