
Learn to build WordPress plugins with PHP, HTML, CSS, and MySQL, covering CPTs, shortcodes, widgets, wpdb, and secure data handling with sanitization and localization.
Prepare by meeting prerequisites and PHP knowledge; follow the course on WordPress plugin development, use provided materials and code comparisons, and review the FAQ to maximize learning.
Learn how to set up your development environment for WordPress plugin work, choose the right IDE, enable WP debug, and use essential debugging tools and references for efficient plugin development.
Discover how action hooks and filters shape WordPress behavior by adding code or modifying content, using callbacks, priorities, and practical examples like wp_enqueue_scripts and the_content.
Discover practical action hooks in WordPress by using do_action and add_action on frontend and admin, attach callbacks to loop_start and loop_end, and control execution order with priority and multiple arguments.
Explore how filters modify data in WordPress using apply_filters and add_filter, passing callbacks to alter content like the_content and body_class, with tips on parameters and priority.
Explore the MV Slider plugin: build a custom post type driven slideshow with metabox fields, settings page, and shortcode; customize frontend slides, admin controls, styles, and basic localization and uninstallation.
Organize a WordPress plugin within wp-content/plugins, set up the mv-slider directory with assets, languages, post-types, shortcodes, vendor, and views, and build the mv-slider.php with a plugin header and security checks.
Contrast class-based plugins with single-file approaches, embrace mvc-inspired structure to separate frontend and admin code, instantiate and run plugins via constructors for a flexible, maintainable architecture.
Define constants in the plugin to centralize paths, URLs, and the version, using MV_SLIDER_PATH, MV_SLIDER_URL, and MV_SLIDER_VERSION with plugin_dir_path, plugin_dir_url, and __FILE__ to load PHP files and static resources.
Learn how to trigger plugin activation, deactivation, and uninstallation using WordPress hooks, static methods, and manage tasks like creating tables, a custom post type, and options during install and removal.
Register a custom post type in WordPress to extend posts, gaining access to the wp_posts and wp_postmeta tables, admin screens, templates, caching, and post revisions.
Register the mv-slider custom post type with register_post_type, set labels and supports, adjust public and UI options, expose via REST API, and unregister on deactivate.
Explore the metabox API and metadata in WordPress, learn to create metaboxes for a CPT to store slide button text and URL, and understand postmeta relationships.
Create and display metabox fields for a WordPress post, saving their values to wp_postmeta via a form submitted by post, using the add_inner_meta_boxes callback and a separate HTML view.
Learn to secure metabox data in WordPress by sanitizing and validating input, escaping output, and using sanitize_text_field and esc_url_raw to prevent XSS.
Learn how to display post meta data in the WordPress metabox for the admin backend, fetch values with get_post_meta, and safely escape output with esc_html, esc_url, and esc_attr.
Master metabox security in WordPress by using nonces—creating and verifying a hidden nonce with wp_create_nonce and wp_verifiy_nonce—and guarding save actions with autosave checks and current_user_can capabilities.
Use the metabox api to add and display metadata in the post type table by defining columns and filling them with a callback, and make them sortable.
Add an admin menu for a plugin settings screen with add_menu_page and the admin_menu hook, using capabilities to restrict access; explore the five menu types and submenu options.
Add submenus to the WordPress admin with add_submenu_page, load existing CPT pages, and adjust show_in_menu to place items in main or submenu menus.
Explore the options and settings APIs to create plugin settings pages, store values in wp_options, and build secure admin interfaces with prebuilt forms and fields.
Build settings form for a WordPress plugin using the options API and options.php to process submissions. Structure the form with sections and fields, and display the admin page title safely.
Build a WordPress settings page using the MV_Slider_Settings class and a static options array loaded with get_option. Add two sections and four fields via admin_init with settings callbacks for mv_slider.
Learn to call register_setting with an option_group in WordPress, create a setting (mv_slider_options), and render sections and fields with settings_fields, do_settings_sections, and submit_button to save data to the database.
Explore adding sections and fields with the settings and options API, creating a second page, and storing text, checkbox, and select values in a serialized plugin options array.
Pass arguments to add_settings_field via the last parameter, share items with the callback, loop through them, escape attributes with esc_attr and esc_html, and use label_for for accessible WordPress plugin settings.
Demonstrates using register_setting with a validation callback to sanitize and validate multiple settings fields, iterating over input, applying sanitize_text_field, esc_url_raw, and absint per field, and handling empty values.
Guard access to the settings page using current_user_can with manage_options to prevent unauthorized viewing. Display success and error messages with add_settings_error and settings_errors, triggered by url parameters and validation.
Split a WordPress settings page into tabs using the Settings and Options APIs, build a two-tab nav-tab interface, manage active states, and save data to the wp_options table.
Explore the shortcode API to build a simple slideshow plugin using a tag, attributes, and content so users insert slides into posts or pages.
Create a mv_slider shortcode class in mv-slider-shortcode.php, register it with add_shortcode, and implement a callback that normalizes attributes to lowercase, applies defaults with shortcode_atts, and sanitizes ids with absint.
Learn to bootstrap a WordPress shortcode slideshow by integrating FlexSlider, including HTML structure, JavaScript configuration, CSS, and dynamic slide generation via a shortcode loop.
Create the WordPress shortcode view by separating HTML from PHP, buffering output with ob_start and ob_get_clean, and wiring content or settings to render slides in a Flexslider layout.
Create a custom loop with WP_Query to display slides from the mv-slider CPT, using shortcode arguments to filter by post type, status, IDs, and sort order.
Create a custom shortcode view using WP_Query to loop slides, display the featured image, title, and content, and render a button link from post meta, then reset post data.
Register admin scripts with the admin_enqueue_scripts hook and enqueue admin.css to style backend fields. Load the CSS only on the cpt edit page using $typenow or $pagenow.
Learn to make shortcode options dynamic in a WordPress plugin by tying CSS classes to a style setting (style-1 or style-2), with defaults and safe frontend output.
Explore dynamic shortcode options by adding a default placeholder image when a post lacks a featured image, using has_post_thumbnail checks, a gray default.jpg, and wp-post-image styling in WordPress plugin development.
Learn to dynamically control slider navigation bullets in a WordPress shortcode by using script localization to pass PHP values to JavaScript and render shortcodes in templates.
Learn how to translate a WordPress plugin through localization and internationalization, identifying strings displayed to the end user, using textdomain, and creating POT, PO, and MO files.
Learn to internationalize a WordPress plugin by using gettext functions and loading translations with load_textdomain and load_plugin_textdomain. Place MO files in a languages folder and use mv-slider as the textdomain.
Translate and localize a WordPress plugin by marking PHP and HTML strings with __ and _e, using mv-slider as the textdomain, across PHP files and views.
Learn to securely translate a WordPress plugin by escaping translation strings with esc_html and esc_attr, applying the correct context for HTML content and attributes.
Use Poedit to create a POT template for your WordPress plugin, enabling easy translation by generating PO and MO files for global use.
Translate a WordPress plugin using pot and po files with poedit, preserve codes, handle singular and plural forms, compile mo, and test in admin by changing WordPress language.
Learn how to cleanly uninstall a WordPress plugin by removing options and custom post type data, including slides and their metadata.
Build MV testimonials plugin as a widget plugin controlled by WordPress widget manager. Configure the widget with a title and number of testimonials, and explore widget API and theme support.
Create the plugin foundation by adding a custom post type named mv-testimonials. Configure activation, deactivation, and uninstall hooks, and enable rest, archives, and a dashicons menu.
Create custom fields for the testimonials post type with the metabox API, adding occupation, company, and company URL in a dedicated metabox and wiring through the add_meta_boxes hook.
Create and save metabox fields in WordPress by hooking save_post, validating nonce and permissions, sanitizing inputs with sanitize_text_field and esc_url_raw, and updating post meta with get_post_meta and update_psot_meta.
Learn how the WordPress widgets API turns PHP classes into HTML widgets that display testimonials in any registered widget area, via dragging and frontend wrappers.
Create a WordPress widget class MV_Testimonials_Widget that extends WP_Widget, overrides the constructor, form, widget, and update, registers via widgets_init, and renders frontend content from $instance.
Learn to build a WordPress widget form, defining five controls: title, number of testimonials, and three checkboxes for image, occupation, and company, then save and render them on the frontend.
Learn how to save widget configuration in WordPress using the update method, merging new_instance data into old_instance, sanitizing with sanitize_text_field and absint, and storing serialized widget data in wp_options.
Display the widget on the frontend using the widget method with args and instance, set default values for title, image, occupation, and company, and render wrapper with before_title and after_title.
Build a frontend testimonials widget using a dedicated view and a WP_Query loop to display title, content, and optional image with meta fields for occupation and company with a link.
Style the widget on the frontend by loading css and font assets from assets/css and assets/font through an enqueue method. Use is_active_widget to trigger enqueue via add_action on wp_enqueue_scripts.
Explore how templates like single.php and archive.php control content display, and how a plugin can replace theme templates (single-product.php, archive-product.php) to show post-type custom fields.
Create plugin templates by adding single-mv-testimonials.php and archive-mv-testimonials.php for a custom post type, using filters to let themes opt in via mv-testimonials support.
Define and customize the plugin's template overrides for archive and single views, using header and footer calls, a central loop, and theme-consistent markup to fit native WordPress themes.
Implement a plugin template override system that lets themes copy plugin templates into the theme to customize, like WooCommerce, using get_stylesheet_directory to locate the override directory.
Create a translation file from the pot, generate po and mo with Poedit, load translations with load_textdomain, and use the correct text-domain across languages like Brazilian Portuguese.
Learn how to implement the WordPress plugin uninstall method by deleting widget data stored in widget_mv-testimonials and CPT data and metadata via delete_option in wp_options.
Create and manage the mv translations plugin project on WordPress, focusing on custom tables, crud operations with wpdb, and frontend translation submission with admin moderation.
Evaluate the advantages and disadvantages of using a separate custom table for metadata instead of wp_postmeta. Learn why main data stays in wp_posts to preserve admin features, WP_Query, and caching.
Learn how to use the $wpdb class to create and manage a custom WordPress table, including activation checks, using dbDelta, and storing the plugin version in wp_options.
Check for existing submit-translation and edit-translation pages on plugin activation using the $wpdb get_row; if absent, wp_insert_post creates them in wp_posts with post_name, post_type page, and shortcode content.
Create a custom post type mv-translations and a non-hierarchical singers taxonomy, register them with init, configure rewrite slug and rest support, and integrate into the admin menu for translations.
Register the wp_translationmeta table for use with WordPress, access data via the $wpdb class, and build a translations options metabox with transliteration and video URL fields.
Learn how to save translation metadata with the $wpdb insert method, syncing WordPress post data via the wp_insert_post hook and validating inputs to store transliteration in the translationmeta table.
Learn to use the wp_insert_post hook for new and updated posts and employ $wpdb->update to modify translation fields, controlled by a hidden mv_translations_action that distinguishes save from update.
Delete data from the custom sub-table when a post is deleted, using the wpdb delete method and the delete_post hook. Keep the sub-table synchronized with wp_posts to avoid garbage data.
Learn to mirror backend data on the frontend by building a submit translation form, an edit translation form, and a simple template to display translations, using two shortcodes.
Create the frontend view for the first shortcode with an html form and a wp_editor for translation content, plus a user posts table for submitted translations.
Process and validate shortcode form submissions, insert a pending translation post into wp_posts, save custom metadata via a CPT class, and prepare for securing data in the next lesson.
Secure the shortcode view by sanitizing inputs with sanitize_text_field and wp_kses_post, validating form fields and nonce checks, and displaying errors before saving posts.
Implement basic form validation in a WordPress plugin by integrating jquery validation, registering and enqueuing jquery.custom.js and jquery.validate.min.js from the assets folder, and applying it to the translations-form shortcode.
Preserve user input in the WordPress shortcode view by populating fields with previous values and editor content, and set up access controls based on login status for the next lecture.
Implement a shortcode view that manages translation submissions via WordPress user management, including a registration and login flow using wp_insert_user and contributor roles.
Validate a WordPress registration form using WP_Error to handle required fields, username and email checks, and error display; save only when no errors, then show the login form.
Implement a shortcode view that displays translations in a bottom list by joining wp_posts and wp_translationmeta, filtering for the logged-in user, and supporting edit and delete actions.
Create a shortcode view in WordPress by conditionally displaying a results table with a foreach loop, formatting post dates, showing titles, transliteration status, and edit and delete links using add_query_arg.
Create the edit shortcode view to display and edit translation post data, reusing the first shortcode's code and using wp_update_post with ARRAY_A to prefill the form from two tables.
Learn to implement the edit shortcode view in a WordPress plugin, display all fields (title, content, singers via get_the_term_list), use wp_editor, enforce edit permissions, and prevent form resubmission.
Create a plugin specific single post template to display two custom fields and a taxonomy for the translation post type, overriding the theme's single.php and using a custom loop.
Display extra fields in the plugin's specialized template by using transliteration to add a has-transliteration class, embed video with WP_Embed, list singers via taxonomy, and enqueue CSS.
Translate the plugin by using gettext translation functions, create a languages folder with a pot template, and generate PO and MO files with Poedit.
Delete the plugin by removing mv_translations_db_version from wp_options, deleting translations as a custom post type, removing the two installation pages, then drop wp_translationmeta with $wpdb and heed the prepare caveat.
Learn how action hooks make WordPress plugins customizable using do_action and add_action. Set priorities for callbacks, manage hooks with remove_action, and integrate with themes and WooCommerce.
100% Answer Rate! Every single question posted to this class is answered within 24 hours by the instructor.
DISCLAIMER: before you enroll in this course, please read carefully the "Who is this course for?" section below. This course has prerequisites and MUST NOT be taken by students that don't have a solid foundation in programming.
Do you want to stop losing customers for not knowing how to create plugins?
Are you also trying desperately to learn how to create your own plugins, but are not succeeding? You've been trying for a few years now, but still haven't found good and up-to-date teaching material. Then got tired of simply looking at how long is the WordPress documentation for plugin creators.
Plugins are part of what makes WordPress be what it is, the most used content management system in the world, present in more than 30% of sites worldwide! Learning how to deal with the WordPress plugin engine will set you free from third-party tools. It will also put a powerful knowledge in your hands that will help you reach new clients, financial independence, or at least a new job or a promotion at work.
All will start with this course!
This course is unlike any course you've ever seen. It's about 100 lessons, organized in three amazing projects, in which I teach you everything I've been learning over the ten years I've been working with WordPress. Absolutely everything! This course won't hide anything. All subjects are covered in great depth, with the teaching style recognized by my more than 20,000 students around the world!
All this using only native WordPress tools. No using plugins to create another plugin!
What exactly will you learn?
Here is a shortlist of the main topics covered by this course. You will learn:
How to use WordPress action hooks and filters to your advantage to control the behavior of plugins and make them more flexible;
How to structure your projects in a cleaner and more flexible way using PHP classes and objects;
How to use the main native WordPress APIs, classes, and functions to create your plugin. For example, the Settings, Options, Widgets, Shortcode, Metabox APIs, and the methods of the very powerful $wpdb class;
How to create custom post types (CPTs), making WordPress the perfect framework for any project you want to create;
How to create your own taxonomies, custom menus, options pages, your own widgets and shortcodes with multiple options, metadata boxes with custom fields, etc;
How to add stylesheets and javascript in both the admin and the frontend and control them via the options pages;
How to install and preview what to do when installing, deactivating, and uninstalling the plugin;
How to control the plugin's template in the frontend, as well as create a WooCommerce-like template override system;
How to create specific theme support for your plugin.
And much more! How about learning how to manage a custom table for your plugin in the WordPress database?
Do you know all the WordPress tables? Do you know what they do and how they are structured? You'll learn all about them here!
In addition, you will learn how to perform all CRUD actions (create, read, update, and delete data) on your own table using the super powerful $wpdb class.
Have you ever thought of leaving the limitations that the WordPress system imposes and building your project based on a separate table? In this course, you will learn how to do it, understand in which cases it is necessary, and what are the advantages and disadvantages.
And it doesn't stop here...
What about using the frontend to let the user submit data to this table?
I think you didn't see that coming! Well, in this course you will understand what you will need to enable a logged-in user to submit information, which will be stored in a table automatically created by your plugin during installation.
You will also learn how to manage your own users by creating an account for them using native WordPress tools.
All this in a very secure way!
We will be constantly on the lookout for possible security threats that could compromise our application. We will use all security items such as nonces (ever heard of them?), string escaping, validations, sanitization, permission functions, error handling, and $wpdb's prepare() method.
How about making your plugin go international?
You will learn how to create plugins that are fully translatable. Customers from all over the world will be able to use them, as they will be fully compatible with Poedit or any WordPress translation plugin.
How is this course organized?
The course is divided into projects. In the beginning, we will have three projects. It doesn't sound like much, but they will give a fantastic idea of what is needed to basically understand how most of the plugins work.
In the first project, we will create a highly dynamic and fully customizable slideshow plugin. We will start with simple subjects such as directory structuring, methods of installing, deactivating, and uninstalling plugins. Then we will move on to intermediate topics such as CPT creation, the Metabox API (used to create custom fields), we will learn how to manipulate the database by adding and updating values in the metadata tables. We will learn how to control menus and submenus throughout the WordPress admin area.
Also within this first project, we will learn to master APIs such as Settings, Options, and the Shortcode API. We will use everything we learn in this section to control the appearance and behavior of the slideshow on the frontend.
The second project is a testimonial plugin. It looks simple, but the number of techniques that you will learn will surprise you.
In this project, we will review some subjects that you will have already seen in the previous section, and learn some new ones. We will learn a lot about the Widgets API and also how to control the HTML templates used in your plugin, including learning how to implement a simple template override system, which also includes learning how to create a specific theme_support for your plugin.
The third project is the most complete and the most complex of the three. Have you ever needed to create custom tables for your plugin? Do you have any idea how some of the best-known plugins, like WooCommerce (just to name one of them), do to create and manage tables outside of the WordPress realms? Do you know why they do this, what are the advantages and disadvantages? No? Great, because you are going to learn that in this course.
In the third project, you will learn about the WordPress $wpdb class, the one responsible for managing all the custom table CRUD operations in your application. You will learn how to create tables, run queries, add, update, and remove data from those tables, using various APIs that you have learned to master during the course, such as the Metabox and Shortcode APIs.
You will learn how to synchronize these actions so that your table works in tandem with the native WordPress tables. In addition, in this section, you will see how to provide a frontend interface where the site user can submit data, without having to access the WordPress admin. We will also see how to use WordPress' own user control system to manage user actions.
Who is this course for?
I recommend this course for programmers, IT students, web developers, web designers, or any freelancer or professional who works with PHP, HTML, and CSS. It is recommended that you have notions of object-oriented PHP because all plugins created in the course are based on classes and objects. It is also important that you know how to use the main MySQL commands.
Other than that, all professionals who want to learn how to create plugins are welcome. It is only necessary that you already have previous contact with WordPress and know how to install it on a local server at least.
How is this course different?
What my students like most is my excellent response time to their questions. You know, waiting too long can slow down your progress. So I always try to answer within 24 hours. You can be sure that you will never feel alone in this course.
Do you have any doubts? Here's what my student Captain Krik recently wrote about one of my courses:
"Fantastic teacher, everything is explained clearly and simply. The lessons deepen in a professional way the aspects most suitable for a developer, as promised by the author. A big thank you to Marcello who made me learn new and interesting things. I also immediately bought the WordPress course which promises the same things."
And this one is from my student Nate S:
"I was going to wait until I finish the course to leave a review, but I'm halfway through and I can already say it's one of the absolute best courses I've taken on Udemy. It does not waste your time dwelling on extraneous concepts like CSS and does not use any unnecessary technology that might require extra setup or become outdated like Webpack. It's straight to the point and extremely clear in every topic discussed in each video. He is also quick to respond and provides links for each topic as well as the full course code for easy troubleshooting. Just fantastic! If he makes another WordPress course, I will be taking it."
And the list goes on...
So, are you ready for this course? Watch the free lessons available before you make your decision.
Remember, this is a Udemy course, so you have nothing to lose. You can count on a 30-day 100% money-back guarantee if you don't like it.
Join us now and learn without limits!