Running snippet on button click
-
Hello! I’m fairly new to the plugin and WordPress in general, so I apologize in advance if my questions are a bit silly.
I’m trying to create a button on my site; on a click, it should run a php snippet (without reloading the page, if possible, though I suspect I’ll need and AJAX for that).
So I’ve written the function in a snippet, but I don’t know how should I add it to the WordPress functions (You know, “add_action” and all that jazz. It’s still quite confusing to me)and then “link it” to the button.
Could I please get some enlightenment?
Thanks!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Running snippet on button click’ is closed to new replies.