Custom dynamic tag context
-
Following the docs here for creating a custom dynamic tag. I noticed in the post custom field dynamic tag, the tag uses
get_post_custom_keys
to get all post meta for the post being previewed in the template builder. So when you go to pick a custom key, you get a dropdown with all the post meta for the post being previewed.However, if I do the same thing in my custom dynamic tag, I get the custom fields for the elementor template post being edited, not the post being previewed within the template builder.
I couldn’t figure out how the post custom field dynamic tag is setting up the postdata to ensure it gets the correct keys from the
get_post_custom_keys
call. Any chance you can shed some light on that?
- The topic ‘Custom dynamic tag context’ is closed to new replies.