Build WordPress plugins from scratch: actions and filters, shortcodes, settings pages, custom post types, meta boxes, AJAX, REST endpoints, custom tables, cron and blocks.
Lessons
A WordPress plugin is a package of PHP code that adds a feature to a site — a contact form, a custom post type, an SEO panel — by hooking into WordPress at defined points rather than editing WordPress core files.
That last part is the rule that makes the whole ecosystem work. You never change a core file. Core updates would wipe your change out, and every other plugin assumes core is untouched. Instead, WordPress exposes thousands of hooks — named moments where it pauses and lets plugins run their code or change a value.
| Belongs in a plugin | Belongs in a theme |
|---|---|
| Custom post types and taxonomies | Layout and visual design |
| Shortcodes and blocks that content depends on | Template files for displaying content |
| Settings pages, forms, integrations | Menus locations and widget areas |
| REST API endpoints, scheduled tasks | Fonts, colours, image sizes for the design |
The test: if a user switched themes tomorrow, would they lose something important? If yes, it belongs in a plugin.
wp-config.php runs and connects to the database.active_plugins option — the list you control from the Plugins screen.includes the main file of each active plugin, in alphabetical order.plugins_loaded — every plugin is now available.functions.php loads.init, then parses the request, runs the query and renders the page.Notice that your plugin's main file runs very early, before the theme and before WordPress knows what page was requested. That is why plugins rarely do things at load time. They register callbacks on hooks, and the work happens later, at the right moment.
| Action | Filter | |
|---|---|---|
| Purpose | Do something at a point in time | Change a value before WordPress uses it |
| Register with | add_action() | add_filter() |
| Your callback | Returns nothing | Must return the (possibly changed) value |
| Example | Send an email when a post is published | Add text to the end of every post's content |
Lessons 4 to 6 cover hooks in depth. Almost every other lesson in this path is "find the right hook, attach the right callback".
Across this path you will build GDC Books, a plugin for managing a book catalogue. It grows a Book post type, a Genre taxonomy, ISBN and page-count fields, a settings page, a [gdc_books] shortcode, an AJAX "favourite" button, a REST API endpoint, a scheduled cleanup task, a widget and a block — every major plugin technique, all in one codebase.
Tip: The Plugin Developer Handbook and the Code Reference are the official documentation. Every function in this path is listed there with its full parameters.
add_action() or add_filter() call.In accordance with Section 6 & Section 7 of the DPDP Act 2023, third-party analytics and marketing trackers are strictly gated behind your affirmative consent. You may withdraw consent at any time under Section 6(4).
Essential for session authentication (ci_session), Cross-Site Request Forgery security (csrf_cookie_name), and Cloudflare DDoS/bot prevention. Cannot be disabled.
Gated under DPDP Section 7. Allows Google Analytics 4 (Google Consent Mode v2) to measure aggregate, anonymized tool usage.
Enables browser local storage to preserve your theme selection (dark/light mode) and code editor layout between visits.
Used to display developer sponsorships and native tool partner notices.