Archived topic
element in two (or more) locations
3 replies · Started by Dan on November 14, 2022
When creating an element, there is an option to have it show only in one location (before title, after header etc...)
Is there a way to have an element show up in 2 places without creating 2 separate elements?
For example, displaying social share buttons in 2 places on the page: 1. after the posts title 2. at the end of the post.
Is this doable?
Thanks,
Dan
Hi Dan,
Unfortunately that's not possible - you would need to create the element twice.
The WP hook functionality only allows you to add content to one hook at a time as well:
https://developer.wordpress.org/plugins/hooks/actions/
https://docs.generatepress.com/article/using-hooks/
Thanks Leo,
Maybe a future option?
Dan
A theme (any themes) cannot control how the hook functions work in WP.
If WP supports it in one day then we will be able to support it.
I believe the links provided in my initial reply explained this :)