SlideShare a Scribd company logo
1
đź‘‹ Welcome!
As you join, feel free to
answer these questions in
the chat:
1. What region are you joining us from?
2. What do you do with WordPress?
3. What are you hoping to learn today?
Learn.WordPress.org
Let's code!
Creating your first
WordPress Plugin
Jonathan Bossenger
Announcements
â—‹ Welcome, and thanks to Kathryn for co-hosting with me today!
○ We’ll be presenting in focus mode.
â—‹ You are welcome to ask questions.
â—‹ You are welcome to unmute to ask questions, or post them in the chat.
Announcements
â—‹ Final code from this session:
• https://github.com/jonathanbossenger/wordpress-plugin
• https://github.com/jonathanbossenger/wordpress-
plugin/releases/download/1.0.0/wordpress-plugin.zip
â—‹ If I am going to fast, please let me know!
â—‹ We will be posting this session to https://wordpress.tv/ afterwards
â—‹ More more WordPress focused content please visit https://learn.wordpress.org/
Learning Outcomes
â—‹ What is a plugin
â—‹ When to use a plugin vs creating a child theme
â—‹ How to create a plugin for WordPress
• What is the bare minimum needed for a valid plugin
• Adding some plugin details to your plugin header
â—‹ Experiment #1: Interacting with the WordPress Dashboard
â—‹ Experiment #2: Interacting with your WordPress theme
â—‹ Experiment #3: Interacting with something outside of WordPress
What is a plugin?
â—‹ https://developer.wordpress.org/plugins/intro/what-is-a-plugin/
â—‹ Plugins are packages of code that extend the core functionality of WordPress.
â—‹ Plugins are made up of PHP code and can include other assets such as images,
CSS, and JavaScript.
â—‹ All you need to create a plugin is to turn a great idea into code.
â—‹ Plugin Developer Handbook
• https://developer.wordpress.org/plugins/
When should I use a plugin vs a child theme?
â—‹ Creating your first child theme
• https://wordpress.tv/2022/07/11/lets-code-creating-your-first-wordpress-
child-theme/
â—‹ Two things to note
• Plugins are loaded before themes/child themes
• Plugins can be independent of the theme, child themes are reliant on the
parent theme.
When should I use a plugin vs a child theme?
â—‹ Use a child theme when your custom functionality is directly related to the
theme’s layout or design
• Custom CSS
• Custom templates
• Functionality related to custom CSS or a custom template.
When should I use a plugin vs a child theme?
○ Use a plugin when your custom functionality is not related to the theme’s
layout or design
• A form that you want to use in multiple places
• Adding a custom database table for specialist data
• Connecting to external APIs to display data on a site
10
Let’s create our first
plugin.
Learn.WordPress.org
Thank You!
Questions?

More Related Content

PPTX
New WordPress Developer APIs The Interactivity API
PPTX
The WordPress HTML API
PPTX
The WordPress Create Block tool
PPTX
PHP compatibility testing with PHPCompatibilityWP
PPTX
Common WordPress APIs_ Settings API
PPTX
Common WordPress APIs - Options API
PPTX
Common WordPress APIs_ HTTP API.pptx
PPTX
Common WordPress APIs: Metadata
New WordPress Developer APIs The Interactivity API
The WordPress HTML API
The WordPress Create Block tool
PHP compatibility testing with PHPCompatibilityWP
Common WordPress APIs_ Settings API
Common WordPress APIs - Options API
Common WordPress APIs_ HTTP API.pptx
Common WordPress APIs: Metadata

More from Jonathan Bossenger (20)

PPTX
What’s new for developers_ (August 2023).pptx
PPTX
Testing your plugins for PHP version compatibility
PPTX
Common WordPress APIs_ Global Variables
PPTX
Common WordPress APIs_ Internationalization
PPTX
Testing WordPress 6.3 - Developer edition
PPTX
Common WordPress APIs: Responsive Images
PPTX
Common WordPress APIs - Dashboard Widgets
PPTX
Custom Tables in WordPress
PPTX
The WordPress Database
PPTX
WordPress Coding Standards
PPTX
Managing a WordPress Multisite Network
PPTX
Debugging in WordPress
PPTX
Testing plugins for PHP 8
PPTX
Introduction to WordPress Multisite Networks
PPTX
Developing for multisite
PPTX
Custom Post Types and Capabilities.pptx
PPTX
Developing WordPress User Roles and Capabilities
PPTX
Let's code: WordPress multisite experiments
PPTX
Creating a WordPress multisite network
PPTX
Extending WordPress: common security vulnerabilities
What’s new for developers_ (August 2023).pptx
Testing your plugins for PHP version compatibility
Common WordPress APIs_ Global Variables
Common WordPress APIs_ Internationalization
Testing WordPress 6.3 - Developer edition
Common WordPress APIs: Responsive Images
Common WordPress APIs - Dashboard Widgets
Custom Tables in WordPress
The WordPress Database
WordPress Coding Standards
Managing a WordPress Multisite Network
Debugging in WordPress
Testing plugins for PHP 8
Introduction to WordPress Multisite Networks
Developing for multisite
Custom Post Types and Capabilities.pptx
Developing WordPress User Roles and Capabilities
Let's code: WordPress multisite experiments
Creating a WordPress multisite network
Extending WordPress: common security vulnerabilities

Let's code! Creating your first WordPress Plugin

  • 1. 1 đź‘‹ Welcome! As you join, feel free to answer these questions in the chat: 1. What region are you joining us from? 2. What do you do with WordPress? 3. What are you hoping to learn today?
  • 2. Learn.WordPress.org Let's code! Creating your first WordPress Plugin Jonathan Bossenger
  • 3. Announcements â—‹ Welcome, and thanks to Kathryn for co-hosting with me today! â—‹ We’ll be presenting in focus mode. â—‹ You are welcome to ask questions. â—‹ You are welcome to unmute to ask questions, or post them in the chat.
  • 4. Announcements â—‹ Final code from this session: • https://github.com/jonathanbossenger/wordpress-plugin • https://github.com/jonathanbossenger/wordpress- plugin/releases/download/1.0.0/wordpress-plugin.zip â—‹ If I am going to fast, please let me know! â—‹ We will be posting this session to https://wordpress.tv/ afterwards â—‹ More more WordPress focused content please visit https://learn.wordpress.org/
  • 5. Learning Outcomes â—‹ What is a plugin â—‹ When to use a plugin vs creating a child theme â—‹ How to create a plugin for WordPress • What is the bare minimum needed for a valid plugin • Adding some plugin details to your plugin header â—‹ Experiment #1: Interacting with the WordPress Dashboard â—‹ Experiment #2: Interacting with your WordPress theme â—‹ Experiment #3: Interacting with something outside of WordPress
  • 6. What is a plugin? â—‹ https://developer.wordpress.org/plugins/intro/what-is-a-plugin/ â—‹ Plugins are packages of code that extend the core functionality of WordPress. â—‹ Plugins are made up of PHP code and can include other assets such as images, CSS, and JavaScript. â—‹ All you need to create a plugin is to turn a great idea into code. â—‹ Plugin Developer Handbook • https://developer.wordpress.org/plugins/
  • 7. When should I use a plugin vs a child theme? â—‹ Creating your first child theme • https://wordpress.tv/2022/07/11/lets-code-creating-your-first-wordpress- child-theme/ â—‹ Two things to note • Plugins are loaded before themes/child themes • Plugins can be independent of the theme, child themes are reliant on the parent theme.
  • 8. When should I use a plugin vs a child theme? â—‹ Use a child theme when your custom functionality is directly related to the theme’s layout or design • Custom CSS • Custom templates • Functionality related to custom CSS or a custom template.
  • 9. When should I use a plugin vs a child theme? â—‹ Use a plugin when your custom functionality is not related to the theme’s layout or design • A form that you want to use in multiple places • Adding a custom database table for specialist data • Connecting to external APIs to display data on a site
  • 10. 10 Let’s create our first plugin.