SlideShare a Scribd company logo
Why & How to Createa WordPressPlugin
Joe Querin – www.joequerin.com
NEO WP West Meetup – June 6, 2017
@joequerin joecue
joecue
{ About: Joe }
• Graphic Design major
• Self taught Web Developer for 19+ years
• Currently work full-time at Lorain County
Community College for 18+ years.
• WordPress experience last 6 years
• Recently completed moving our college
website to WordPress, and working on an additional 6-
8.
www.joequerin.com
{ Overview }
• What is a Plugin?
• Why create a Plugin?
• When should you create a Plugin?
• Ways to write a plugin.
• Demo
• Questions
{ What is a Plugin? }
• Code that adds functionality (Custom Post
Type or Custom Fields, etc)
• Code that alters WordPress Core code
(filters/actions)
• Code to create Widgets
• Many more…
{ Why Create a Plugin? }
• Custom functionality that does not already
exist.
• Want to improve upon an existing plugin idea.
• Need to add functionality that directly impacts
unique content.
• You want to see if you can!
{ Types of Plugins }
• Standard Plugin
/wp-content/plugin/
• MU-Plugin (Must Use Plugin)
/wp-content/mu-plugins/
• Drop-ins
/wp-content/
Don’t have plugin headers, just PHP code.
{ Current List of Dropins }
File Type of Plugin
advanced-cache.php Advanced Caching Plugin (Caching
plugins often use this file)
db.php Custom database class
db-error.php Custom database error message.
install.php Custom install script
maintenance.php Custom maintenance message.
object-cache.php External object cache.
As of WordPress 4.7.5 – June 2017
{ Plugin vs Functions.php }
• On-going debate within the community
• My rule of thumb
(not really mine, since I borrowed the ideas from the community)
– If the functions will create content dependencies, place the
functions in a plugin.
– A content dependency would be a custom post type, custom
fields. Things the site needs to function, without these the site
will break.
– If the functions are more suited for theme needs (custom image
sizes, excerpt length, filter or action that effects content display),
then place those functions in the theme.
– If in doubt, create a plugin
{ Ways to Write a Plugin }
• Site Specific Plugin – WPBeginner
• Very simple and lightweight, good for simple plugins
• WPPB.me – Tom McFarlin and Devin Vinson
• Very robust and developer centric. Great foundation for
a very feature rich and organized plugin.
{ Site Specific Plugin Template }
<?php
/*
Plugin Name: Site Plugin for example.com
Description: Site specific code changes for
example.com
*/
/* Start Adding Functions Below this Line */
/* Stop Adding Functions Below this Line */
?>
Code Demo!!
{ Before we begin }
• What type of plugin are you building?
• What are you building?
• Plan?
• Features?
• Research?
{ Questions? }
Joe Querin
www.joequerin.com
@joequerin
joecue
joecue
{ Links Mentioned }
• WPBeginner Site Specific
http://www.wpbeginner.com/beginners-guide/what-why-and-
how-tos-of-creating-a-site-specific-wordpress-plugin/
• WordPress Plugin Boiler Plate https://wppb.me/
• WordPress Settings API
https://codex.wordpress.org/Settings_API
• Creating Custom Metaboxes
https://www.smashingmagazine.com/2011/10/create-custom-
post-meta-boxes-wordpress
{ Links Mentioned (cont’d) }
• MU-Plugins
https://codex.wordpress.org/Must_Use_Plugins
• Drop-ins
http://wpengineer.com/2500/wordpress-dropins/
https://hakre.wordpress.com/2010/05/01/must-use-
and-drop-ins-plugins/
•

More Related Content

PPTX
WordCamp Kent 2019 - WP 101: Themes & Plugins: What are they, and where do I ...
PPTX
WP 101 - WordPress Basics
PPTX
WP101 - Themes and Plugins
PPTX
WP 101 - Custom Fields & Post Types
PPTX
WP 101 - Local Development - Themes and Plugins
PPTX
WordCamp Kent 2019 - WP 101: Local Development - Themes and Plugins
PPTX
Anatomy and Architecture of a WordPress Theme
PPTX
WordPress 101 less than an hour
WordCamp Kent 2019 - WP 101: Themes & Plugins: What are they, and where do I ...
WP 101 - WordPress Basics
WP101 - Themes and Plugins
WP 101 - Custom Fields & Post Types
WP 101 - Local Development - Themes and Plugins
WordCamp Kent 2019 - WP 101: Local Development - Themes and Plugins
Anatomy and Architecture of a WordPress Theme
WordPress 101 less than an hour

What's hot (20)

KEY
Writing Your First Plugin
PPTX
Keeping Your Themes and Plugins Organized.
PPTX
Building your first plugin
PDF
How To Work Faster & More Profitably With Client Site Starter Templates
PPTX
DesignTab Final Handover
PDF
Getting started with dev tools (4/10/17 DC)
PDF
Wcto2014
KEY
WordPress APIs
PPTX
WordPress Blogs 101
KEY
Taking WordPress as a CMS, to the Limit
PDF
Spooky WordPress: Disturbingly Brilliant Uses of WP
KEY
WordPress - fixing sites with problems
PDF
Cities: Making Free Accessible WordPress Themes
PDF
Start contributing to OSS projects on your way
PPSX
Steph's Html5 and css presentation
PPTX
Genesis framework presentation
PPTX
How to customise Joomla
PPTX
Multilingual WordPress - Problems And Solutions
PDF
WordPress as a CMS - Case Study of an Organizational Intranet
PDF
Intro to WordPress Child Themes (NERDS Sept 2014)
Writing Your First Plugin
Keeping Your Themes and Plugins Organized.
Building your first plugin
How To Work Faster & More Profitably With Client Site Starter Templates
DesignTab Final Handover
Getting started with dev tools (4/10/17 DC)
Wcto2014
WordPress APIs
WordPress Blogs 101
Taking WordPress as a CMS, to the Limit
Spooky WordPress: Disturbingly Brilliant Uses of WP
WordPress - fixing sites with problems
Cities: Making Free Accessible WordPress Themes
Start contributing to OSS projects on your way
Steph's Html5 and css presentation
Genesis framework presentation
How to customise Joomla
Multilingual WordPress - Problems And Solutions
WordPress as a CMS - Case Study of an Organizational Intranet
Intro to WordPress Child Themes (NERDS Sept 2014)
Ad

Similar to Why & How to Create a WordPress Plugin (20)

PPT
WordPress plugins
PPT
Word press Plugins by WordPress Experts
PPT
PPTX
Wordcamp2012 build your plugin
PDF
Test ss 2
PDF
Plugin Development for Beginners
PDF
5 Steps to Develop a WordPress Plugin From Scratch.pdf
PDF
Extending WordPress - a guide to building your first plugin
PDF
Write your first WordPress plugin
PDF
Do it in code! A guide to creating a custom site structure plugin in WordPress.
PPT
Wordpress Meetup 2 23 10
PDF
WordPress Plugins (WordCamp Utah)
PPTX
How to create your own WordPress plugin
PPTX
Intro to Plugin Development, Miami WordCamp, 2015
PDF
WordCamp Atlanta Presentation
PPTX
A peek into the world of WordPress plugin development
PDF
Write Your First WordPress Plugin
PPTX
WordPress Structure and Best Practices
PPTX
Building Potent WordPress Websites
PPTX
How to content manage everything
WordPress plugins
Word press Plugins by WordPress Experts
Wordcamp2012 build your plugin
Test ss 2
Plugin Development for Beginners
5 Steps to Develop a WordPress Plugin From Scratch.pdf
Extending WordPress - a guide to building your first plugin
Write your first WordPress plugin
Do it in code! A guide to creating a custom site structure plugin in WordPress.
Wordpress Meetup 2 23 10
WordPress Plugins (WordCamp Utah)
How to create your own WordPress plugin
Intro to Plugin Development, Miami WordCamp, 2015
WordCamp Atlanta Presentation
A peek into the world of WordPress plugin development
Write Your First WordPress Plugin
WordPress Structure and Best Practices
Building Potent WordPress Websites
How to content manage everything
Ad

More from Joe Querin (10)

PPTX
Introduction to WordPress Basics - WP 101
PPTX
WordCamp Kent 2019 - WP 101: Guten.. What?
PPTX
WordCamp Kent 2019 - WP 101: Custom Post Type & Custom Fields
PPTX
WordCamp Kent 2019 - WP 101: WordPress Basics
PPTX
One Plugin to Rule All Your Custom Code
PPTX
Building a WordPress Sandbox
PPTX
Using WordPress as a web application platform
PPTX
Responsive Theme Workshop - WordCamp Columbus 2015
PPTX
WP 201 Custom Post Types - Custom Fields - WordCamp Columbus 2015
PPTX
Theme development essentials columbus oh word camp 2012
Introduction to WordPress Basics - WP 101
WordCamp Kent 2019 - WP 101: Guten.. What?
WordCamp Kent 2019 - WP 101: Custom Post Type & Custom Fields
WordCamp Kent 2019 - WP 101: WordPress Basics
One Plugin to Rule All Your Custom Code
Building a WordPress Sandbox
Using WordPress as a web application platform
Responsive Theme Workshop - WordCamp Columbus 2015
WP 201 Custom Post Types - Custom Fields - WordCamp Columbus 2015
Theme development essentials columbus oh word camp 2012

Recently uploaded (20)

PDF
Nykaa-Strategy-Case-Fixing-Retention-UX-and-D2C-Engagement (1).pdf
PDF
Instagram's Product Secrets Unveiled with this PPT
PPTX
Hydrogel Based delivery Cancer Treatment
PPTX
2025-08-10 Joseph 02 (shared slides).pptx
PPTX
worship songs, in any order, compilation
PPTX
Anesthesia and it's stage with mnemonic and images
PPT
The Effect of Human Resource Management Practice on Organizational Performanc...
PPTX
AcademyNaturalLanguageProcessing-EN-ILT-M02-Introduction.pptx
PPTX
Presentation for DGJV QMS (PQP)_12.03.2025.pptx
PPTX
chapter8-180915055454bycuufucdghrwtrt.pptx
DOC
学位双硕士UTAS毕业证,墨尔本理工学院毕业证留学硕士毕业证
PDF
Swiggy’s Playbook: UX, Logistics & Monetization
PPTX
ART-APP-REPORT-FINctrwxsg f fuy L-na.pptx
PPTX
Impressionism_PostImpressionism_Presentation.pptx
PPTX
water for all cao bang - a charity project
PPTX
MERISTEMATIC TISSUES (MERISTEMS) PPT PUBLIC
PDF
oil_refinery_presentation_v1 sllfmfls.pdf
PPTX
PHIL.-ASTRONOMY-AND-NAVIGATION of ..pptx
PPTX
Emphasizing It's Not The End 08 06 2025.pptx
DOCX
"Project Management: Ultimate Guide to Tools, Techniques, and Strategies (2025)"
Nykaa-Strategy-Case-Fixing-Retention-UX-and-D2C-Engagement (1).pdf
Instagram's Product Secrets Unveiled with this PPT
Hydrogel Based delivery Cancer Treatment
2025-08-10 Joseph 02 (shared slides).pptx
worship songs, in any order, compilation
Anesthesia and it's stage with mnemonic and images
The Effect of Human Resource Management Practice on Organizational Performanc...
AcademyNaturalLanguageProcessing-EN-ILT-M02-Introduction.pptx
Presentation for DGJV QMS (PQP)_12.03.2025.pptx
chapter8-180915055454bycuufucdghrwtrt.pptx
学位双硕士UTAS毕业证,墨尔本理工学院毕业证留学硕士毕业证
Swiggy’s Playbook: UX, Logistics & Monetization
ART-APP-REPORT-FINctrwxsg f fuy L-na.pptx
Impressionism_PostImpressionism_Presentation.pptx
water for all cao bang - a charity project
MERISTEMATIC TISSUES (MERISTEMS) PPT PUBLIC
oil_refinery_presentation_v1 sllfmfls.pdf
PHIL.-ASTRONOMY-AND-NAVIGATION of ..pptx
Emphasizing It's Not The End 08 06 2025.pptx
"Project Management: Ultimate Guide to Tools, Techniques, and Strategies (2025)"

Why & How to Create a WordPress Plugin

  • 1. Why & How to Createa WordPressPlugin Joe Querin – www.joequerin.com NEO WP West Meetup – June 6, 2017 @joequerin joecue joecue
  • 2. { About: Joe } • Graphic Design major • Self taught Web Developer for 19+ years • Currently work full-time at Lorain County Community College for 18+ years. • WordPress experience last 6 years • Recently completed moving our college website to WordPress, and working on an additional 6- 8. www.joequerin.com
  • 3. { Overview } • What is a Plugin? • Why create a Plugin? • When should you create a Plugin? • Ways to write a plugin. • Demo • Questions
  • 4. { What is a Plugin? } • Code that adds functionality (Custom Post Type or Custom Fields, etc) • Code that alters WordPress Core code (filters/actions) • Code to create Widgets • Many more…
  • 5. { Why Create a Plugin? } • Custom functionality that does not already exist. • Want to improve upon an existing plugin idea. • Need to add functionality that directly impacts unique content. • You want to see if you can!
  • 6. { Types of Plugins } • Standard Plugin /wp-content/plugin/ • MU-Plugin (Must Use Plugin) /wp-content/mu-plugins/ • Drop-ins /wp-content/ Don’t have plugin headers, just PHP code.
  • 7. { Current List of Dropins } File Type of Plugin advanced-cache.php Advanced Caching Plugin (Caching plugins often use this file) db.php Custom database class db-error.php Custom database error message. install.php Custom install script maintenance.php Custom maintenance message. object-cache.php External object cache. As of WordPress 4.7.5 – June 2017
  • 8. { Plugin vs Functions.php } • On-going debate within the community • My rule of thumb (not really mine, since I borrowed the ideas from the community) – If the functions will create content dependencies, place the functions in a plugin. – A content dependency would be a custom post type, custom fields. Things the site needs to function, without these the site will break. – If the functions are more suited for theme needs (custom image sizes, excerpt length, filter or action that effects content display), then place those functions in the theme. – If in doubt, create a plugin
  • 9. { Ways to Write a Plugin } • Site Specific Plugin – WPBeginner • Very simple and lightweight, good for simple plugins • WPPB.me – Tom McFarlin and Devin Vinson • Very robust and developer centric. Great foundation for a very feature rich and organized plugin.
  • 10. { Site Specific Plugin Template } <?php /* Plugin Name: Site Plugin for example.com Description: Site specific code changes for example.com */ /* Start Adding Functions Below this Line */ /* Stop Adding Functions Below this Line */ ?>
  • 12. { Before we begin } • What type of plugin are you building? • What are you building? • Plan? • Features? • Research?
  • 13. { Questions? } Joe Querin www.joequerin.com @joequerin joecue joecue
  • 14. { Links Mentioned } • WPBeginner Site Specific http://www.wpbeginner.com/beginners-guide/what-why-and- how-tos-of-creating-a-site-specific-wordpress-plugin/ • WordPress Plugin Boiler Plate https://wppb.me/ • WordPress Settings API https://codex.wordpress.org/Settings_API • Creating Custom Metaboxes https://www.smashingmagazine.com/2011/10/create-custom- post-meta-boxes-wordpress
  • 15. { Links Mentioned (cont’d) } • MU-Plugins https://codex.wordpress.org/Must_Use_Plugins • Drop-ins http://wpengineer.com/2500/wordpress-dropins/ https://hakre.wordpress.com/2010/05/01/must-use- and-drop-ins-plugins/ •