Contact Us

If you ever see the word “action” in relation to WordPress, it is referring to a function in the coding of a WordPress site. The function—determined by what a developer inserts in that portion of the coding—will run at a predetermined point as a user navigates through the site.

For example, a developer might wish to insert a notice or short sentence to a given part of the website. Rather than going in and editing the website template, he or she could add the given text to an action that is already being taken in that part of the website.

This is known as “hooking” the desired code to the pre-existing action. It can be as simple as adding a notice to a footer or inserting a script for a pop-up box to run when a user clicks to a specified portion of the website. Essentially, an action simply sets a predetermined piece of code to run at a specific part of the website.

Using actions allows WordPress developers to take shortcuts in building a site. Rather than programming every separate item, developers can piggyback on already existing code and use them to run the new portions of code.

← Back to Glossary