#1 India's Top IT Training Institute

×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →

Hooks: Actions and Filters

Modifying WordPress Without Editing Core

Hooks are the mechanism that let developers change WordPress's behaviour and output without touching any core files, keeping customisations update-safe.

Actions

Actions let you run custom code at a specific point in WordPress's execution, such as after a post is published or when the site footer loads.

You attach a function to an action using add_action(), specifying the hook name and your custom function.

Filters

Filters let you modify a piece of data before it's used or displayed, such as changing post content or excerpt length.

You attach a function to a filter using add_filter(), and your function must return the modified value.

Hook TypeWhat It DoesFunction Used
ActionRuns code at a specific pointadd_action()
FilterModifies data before it's usedadd_filter()

Hooks power a lot of custom functionality, including how WordPress exposes data externally through the REST API and shortcodes.

Ready to master WordPress Training Course?

Join Uncodemy's hands-on, mentor-led WordPress training and build real, live websites.

Explore Course