Not sure to post here or webmasters, I apologize if I got wrong.
Does anyone know of a way to execute a short code on a image click?
I can not find anything on how to do this
Edit: My apologizes
Yes Shortcode means wordpress shortcode
Not sure to post here or webmasters, I apologize if I got wrong.
Does anyone know of a way to execute a short code on a image click?
I can not find anything on how to do this
Edit: My apologizes
Yes Shortcode means wordpress shortcode
You must be logged in to post a comment.
==== Template page ====
==== Ajax page ====
Because I just couldn’t find answers online to my own question on this, I thought I’d post my solution. Using wp_localize_script to load my shortcodes, here is my example:
Then, on image click or any other JS event you are using do:
Then the shortcode is executed on my HTML page in there area where I have:
Get image element by it’s id and attach the handler at
onclick
event something likehtml
JS