Title: How to execute some code on button click
Last modified: September 1, 2016

---

# How to execute some code on button click

 *  [manuelsechi](https://wordpress.org/support/users/manuelsechi/)
 * (@manuelsechi)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/how-to-execute-some-code-on-button-click/)
 * Hi
    I am working on my very first plugin, and I am using the wordpress plugin
   boilerplate. I know how to run some code on a specific event, but I don’t understand
   how to run some code when I click a button or a link.
 * Basically I want to save some options in an option page (I have done this already)
   and then I want to run some other code when I click on another button or link.
   
   Or it could be handy to me enough to know how to run some code when I call a 
   page (and then I could call that page using ajax)
 * can anyone point me to the right direction for that?
 * thanks

The topic ‘How to execute some code on button click’ is closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [manuelsechi](https://wordpress.org/support/users/manuelsechi/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/how-to-execute-some-code-on-button-click/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
