SlideShare ist ein Scribd-Unternehmen logo
1 von 15
Writing your own Themes and Plugins
Stay-at-home mom, business 
owner, wife, WordPress 
plugin developer, mommy 
photographer, reef hobbyist, 
sushi lover, nerd 
@thestephwells
Setup a local server 
Install a server (MAMP, WAMP, XAMPP, Desktop server) 
https://make.wordpress.org/core/handbook/installing-a-local-server/ 
Download WordPress and set it up 
https://make.wordpress.org/core/handbook/installing-wordpress-locally/ 
installing-from-a-zip-file/ 
Get a text editor (Sublime, Notepad ++, TextMate) 
For practice: Go to your local server folder (usually htdocs) 
and create a “testing” folder with an index.html file inside. Go 
to http://localhost/testing to see your blank page.
Learn HTML & CSS 
Go to CodeAcademy.com and go 
through the 7-hour tutorial.
Learn HTML & CSS 
Practice adding content to the testing/index.html 
file you created using your text editor. See the 
results at http://localhost/testing 
Use FireBug or Chrome developer tools to 
inspect a site you like. Make changes here for 
experimentation and they’ll be gone when you 
refresh the page.
Create a Child Theme 
A child theme is an easy way to use a theme you 
like, and continue getting updates without losing any 
of your customizations.
Create a Child Theme 
Add a new folder to your wordpress/wp-content/ 
themes folder and create a file called 
style.css inside it. 
Add the theme header at the beginning of your 
style.css, followed by your own CSS. 
https://gist.github.com/stephywells (my-child-theme)
Create a Theme 
Add another folder to your wordpress/wp-content/ 
themes folder. 
Create style.css and index.php files 
Add the required header to the style.css (Exclude the 
Template: twentyfourteen line) 
The index.php must include the HTML structure, the 
head, loop, and footer. 
https://gist.github.com/stephywells (my-theme) 
If you load jQuery, use wp_enqueue_script 
Start with the Underscores theme
Explore Hooks 
A hook allows your plugin to “hook into” WordPress, a 
parent theme, or another plugin at a specific time or 
place. 
Actions vs Filters 
https://developer.wordpress.org/reference/ 
Example: Display Widgets 
in_widget_form hook to insert and save options in a 
widget 
widget_display_callback hook to show and hide the 
widget
“See a need, fill a need” 
Do you find yourself looking for functionality you 
can’t find? 
Are your clients requesting features for which 
there is no solution? 
Are you using a plugin that doesn’t ideally meet 
your needs? 
Do you reuse code for client projects with minor 
changes?
Write it out 
What is the need? 
Concisely describe the need you would like to fill. 
What makes it different from existing options? 
What steps are required to meet this need? 
Think through the steps the user will take, and 
write down each one. (ie Check a box) 
Write down the tasks needed for each user step. 
(ie Add a box and save it)
Display Widgets 
The need: An easy, foolproof way 
of choosing which widgets are 
shown on the page 
The steps required: 
Add options to the widgets 
Save the options 
Hide and show the front-end widgets 
add_filter(‘widget_display_callback’, ‘show_dw_widget’); 
add_action(‘in_widget_form’, ‘dw_hide_widget_options’, 
10, 3); 
Need filled in 31 lines of code. Filling a need doesn’t need 
to be complicated.
Formidable 
The (original) need: Separate the HTML from the 
content to allow clients to alter the content 
without messing with HTML 
The steps required: 
Back-end forms for collecting data 
Save and retrieve data
You never know where a 
small need may lead.

Weitere ähnliche Inhalte

Was ist angesagt?

Build WordPress themes like a heavyweight - WordCamp Lancaster 2013
Build WordPress themes like a heavyweight - WordCamp Lancaster 2013Build WordPress themes like a heavyweight - WordCamp Lancaster 2013
Build WordPress themes like a heavyweight - WordCamp Lancaster 2013Jonny Allbut
 
WordCamp SF 2011: Debugging in WordPress
WordCamp SF 2011: Debugging in WordPressWordCamp SF 2011: Debugging in WordPress
WordCamp SF 2011: Debugging in WordPressandrewnacin
 
WordCamp Sheffield 2014 Theme Workflow Presentation
WordCamp Sheffield 2014 Theme Workflow PresentationWordCamp Sheffield 2014 Theme Workflow Presentation
WordCamp Sheffield 2014 Theme Workflow PresentationJonny Allbut
 
Responsive Theme Workshop - WordCamp Columbus 2015
Responsive Theme Workshop - WordCamp Columbus 2015Responsive Theme Workshop - WordCamp Columbus 2015
Responsive Theme Workshop - WordCamp Columbus 2015Joe Querin
 
Instagram filters (8 24)
Instagram filters (8 24)Instagram filters (8 24)
Instagram filters (8 24)Ivy Rueb
 
Creating a web gallery lightbox2 final
Creating a web gallery lightbox2 finalCreating a web gallery lightbox2 final
Creating a web gallery lightbox2 finalDaniel Downs
 
WordCamp Birmingham 2015 - Theme building tricks of the trade
WordCamp Birmingham 2015 - Theme building tricks of the tradeWordCamp Birmingham 2015 - Theme building tricks of the trade
WordCamp Birmingham 2015 - Theme building tricks of the tradeJonny Allbut
 
Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)christopherfross
 
Rapid WordPress theme development
Rapid WordPress theme developmentRapid WordPress theme development
Rapid WordPress theme developmentJonny Allbut
 
HTML Coding #01 : Don't Fear the Code
HTML Coding #01 : Don't Fear the CodeHTML Coding #01 : Don't Fear the Code
HTML Coding #01 : Don't Fear the CodeMichael Sturgeon
 
WordCamp Birmingham 2015 - Theme building workshop
WordCamp Birmingham 2015 - Theme building workshopWordCamp Birmingham 2015 - Theme building workshop
WordCamp Birmingham 2015 - Theme building workshopJonny Allbut
 
Saigon Wordpress Meetup - Themes Wordpress Meetup
Saigon Wordpress Meetup - Themes Wordpress MeetupSaigon Wordpress Meetup - Themes Wordpress Meetup
Saigon Wordpress Meetup - Themes Wordpress MeetupTriết Sài Gòn
 
Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?Edmund Turbin
 
Making WordPress Fly with Jetpack
Making WordPress Fly with JetpackMaking WordPress Fly with Jetpack
Making WordPress Fly with JetpackKayleigh Thorpe
 
So You Want to Build and Release a Plugin? WordCamp Lancaster 2014
So You Want to Build and Release a Plugin? WordCamp Lancaster 2014So You Want to Build and Release a Plugin? WordCamp Lancaster 2014
So You Want to Build and Release a Plugin? WordCamp Lancaster 2014ryanduff
 
How to WordPress: the basics, part 1
How to WordPress:  the basics, part 1How to WordPress:  the basics, part 1
How to WordPress: the basics, part 1R-Cubed Design Forge
 

Was ist angesagt? (20)

Build WordPress themes like a heavyweight - WordCamp Lancaster 2013
Build WordPress themes like a heavyweight - WordCamp Lancaster 2013Build WordPress themes like a heavyweight - WordCamp Lancaster 2013
Build WordPress themes like a heavyweight - WordCamp Lancaster 2013
 
Scout web
Scout webScout web
Scout web
 
WordCamp SF 2011: Debugging in WordPress
WordCamp SF 2011: Debugging in WordPressWordCamp SF 2011: Debugging in WordPress
WordCamp SF 2011: Debugging in WordPress
 
WordCamp Sheffield 2014 Theme Workflow Presentation
WordCamp Sheffield 2014 Theme Workflow PresentationWordCamp Sheffield 2014 Theme Workflow Presentation
WordCamp Sheffield 2014 Theme Workflow Presentation
 
Responsive Theme Workshop - WordCamp Columbus 2015
Responsive Theme Workshop - WordCamp Columbus 2015Responsive Theme Workshop - WordCamp Columbus 2015
Responsive Theme Workshop - WordCamp Columbus 2015
 
Instagram filters (8 24)
Instagram filters (8 24)Instagram filters (8 24)
Instagram filters (8 24)
 
Creating a web gallery lightbox2 final
Creating a web gallery lightbox2 finalCreating a web gallery lightbox2 final
Creating a web gallery lightbox2 final
 
WordCamp Birmingham 2015 - Theme building tricks of the trade
WordCamp Birmingham 2015 - Theme building tricks of the tradeWordCamp Birmingham 2015 - Theme building tricks of the trade
WordCamp Birmingham 2015 - Theme building tricks of the trade
 
Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)
 
Rapid WordPress theme development
Rapid WordPress theme developmentRapid WordPress theme development
Rapid WordPress theme development
 
HTML Coding #01 : Don't Fear the Code
HTML Coding #01 : Don't Fear the CodeHTML Coding #01 : Don't Fear the Code
HTML Coding #01 : Don't Fear the Code
 
Web development basics2
Web development basics2Web development basics2
Web development basics2
 
WordCamp Birmingham 2015 - Theme building workshop
WordCamp Birmingham 2015 - Theme building workshopWordCamp Birmingham 2015 - Theme building workshop
WordCamp Birmingham 2015 - Theme building workshop
 
Saigon Wordpress Meetup - Themes Wordpress Meetup
Saigon Wordpress Meetup - Themes Wordpress MeetupSaigon Wordpress Meetup - Themes Wordpress Meetup
Saigon Wordpress Meetup - Themes Wordpress Meetup
 
Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?
 
WordPress plugins
WordPress pluginsWordPress plugins
WordPress plugins
 
Making WordPress Fly with Jetpack
Making WordPress Fly with JetpackMaking WordPress Fly with Jetpack
Making WordPress Fly with Jetpack
 
So You Want to Build and Release a Plugin? WordCamp Lancaster 2014
So You Want to Build and Release a Plugin? WordCamp Lancaster 2014So You Want to Build and Release a Plugin? WordCamp Lancaster 2014
So You Want to Build and Release a Plugin? WordCamp Lancaster 2014
 
How to WordPress: the basics, part 1
How to WordPress:  the basics, part 1How to WordPress:  the basics, part 1
How to WordPress: the basics, part 1
 
Faster WordPress Workflows
Faster WordPress WorkflowsFaster WordPress Workflows
Faster WordPress Workflows
 

Ähnlich wie Writing your own WordPress themes and plugins

Getting started with WordPress development
Getting started with WordPress developmentGetting started with WordPress development
Getting started with WordPress developmentSteve Mortiboy
 
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...LinnAlexandra
 
Step by step guide for creating wordpress plugin
Step by step guide for creating wordpress pluginStep by step guide for creating wordpress plugin
Step by step guide for creating wordpress pluginMainak Goswami
 
Theme development essentials columbus oh word camp 2012
Theme development essentials   columbus oh word camp 2012Theme development essentials   columbus oh word camp 2012
Theme development essentials columbus oh word camp 2012Joe Querin
 
Child Themes (WordCamp Dublin 2017) with notes
Child Themes (WordCamp Dublin 2017) with notesChild Themes (WordCamp Dublin 2017) with notes
Child Themes (WordCamp Dublin 2017) with notesDamien Carbery
 
The Way to Theme Enlightenment
The Way to Theme EnlightenmentThe Way to Theme Enlightenment
The Way to Theme EnlightenmentAmanda Giles
 
Building Potent WordPress Websites
Building Potent WordPress WebsitesBuilding Potent WordPress Websites
Building Potent WordPress WebsitesKyle Cearley
 
Theme development workflow
Theme development workflowTheme development workflow
Theme development workflowShameem Reza
 
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to DevelopmentWordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to DevelopmentEvan Mullins
 
Introduction to Plugin Programming, WordCamp Miami 2011
Introduction to Plugin Programming, WordCamp Miami 2011Introduction to Plugin Programming, WordCamp Miami 2011
Introduction to Plugin Programming, WordCamp Miami 2011David Carr
 
Easy Guide to WordPress Theme Integration
Easy Guide to WordPress Theme IntegrationEasy Guide to WordPress Theme Integration
Easy Guide to WordPress Theme IntegrationSankhala Info Solutions
 
Write your first WordPress plugin
Write your first WordPress pluginWrite your first WordPress plugin
Write your first WordPress pluginAnthony Montalbano
 
WordPress Structure and Best Practices
WordPress Structure and Best PracticesWordPress Structure and Best Practices
WordPress Structure and Best Practicesmarkparolisi
 
The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017Amanda Giles
 
Joomla Beginner Template Presentation
Joomla Beginner Template PresentationJoomla Beginner Template Presentation
Joomla Beginner Template Presentationalledia
 
Adopt or hack - how to hack a theme in a Drupal way
Adopt or hack - how to hack a theme in a Drupal wayAdopt or hack - how to hack a theme in a Drupal way
Adopt or hack - how to hack a theme in a Drupal wayMarek Sotak
 
WordPress Theme Design - Rich Media Institute Workshop
WordPress Theme Design - Rich Media Institute WorkshopWordPress Theme Design - Rich Media Institute Workshop
WordPress Theme Design - Rich Media Institute WorkshopBrendan Sera-Shriar
 
Build a WordPress theme from HTML5 template @ Telerik
Build a WordPress theme from HTML5 template @ TelerikBuild a WordPress theme from HTML5 template @ Telerik
Build a WordPress theme from HTML5 template @ TelerikMario Peshev
 

Ähnlich wie Writing your own WordPress themes and plugins (20)

Getting started with WordPress development
Getting started with WordPress developmentGetting started with WordPress development
Getting started with WordPress development
 
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
 
Step by step guide for creating wordpress plugin
Step by step guide for creating wordpress pluginStep by step guide for creating wordpress plugin
Step by step guide for creating wordpress plugin
 
Theme development essentials columbus oh word camp 2012
Theme development essentials   columbus oh word camp 2012Theme development essentials   columbus oh word camp 2012
Theme development essentials columbus oh word camp 2012
 
Child Themes (WordCamp Dublin 2017) with notes
Child Themes (WordCamp Dublin 2017) with notesChild Themes (WordCamp Dublin 2017) with notes
Child Themes (WordCamp Dublin 2017) with notes
 
The Way to Theme Enlightenment
The Way to Theme EnlightenmentThe Way to Theme Enlightenment
The Way to Theme Enlightenment
 
Building Potent WordPress Websites
Building Potent WordPress WebsitesBuilding Potent WordPress Websites
Building Potent WordPress Websites
 
Theme development workflow
Theme development workflowTheme development workflow
Theme development workflow
 
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to DevelopmentWordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
 
WordPress Theming 101
WordPress Theming 101WordPress Theming 101
WordPress Theming 101
 
Introduction to Plugin Programming, WordCamp Miami 2011
Introduction to Plugin Programming, WordCamp Miami 2011Introduction to Plugin Programming, WordCamp Miami 2011
Introduction to Plugin Programming, WordCamp Miami 2011
 
Easy Guide to WordPress Theme Integration
Easy Guide to WordPress Theme IntegrationEasy Guide to WordPress Theme Integration
Easy Guide to WordPress Theme Integration
 
Write your first WordPress plugin
Write your first WordPress pluginWrite your first WordPress plugin
Write your first WordPress plugin
 
WordPress Structure and Best Practices
WordPress Structure and Best PracticesWordPress Structure and Best Practices
WordPress Structure and Best Practices
 
Fewd week2 slides
Fewd week2 slidesFewd week2 slides
Fewd week2 slides
 
The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017
 
Joomla Beginner Template Presentation
Joomla Beginner Template PresentationJoomla Beginner Template Presentation
Joomla Beginner Template Presentation
 
Adopt or hack - how to hack a theme in a Drupal way
Adopt or hack - how to hack a theme in a Drupal wayAdopt or hack - how to hack a theme in a Drupal way
Adopt or hack - how to hack a theme in a Drupal way
 
WordPress Theme Design - Rich Media Institute Workshop
WordPress Theme Design - Rich Media Institute WorkshopWordPress Theme Design - Rich Media Institute Workshop
WordPress Theme Design - Rich Media Institute Workshop
 
Build a WordPress theme from HTML5 template @ Telerik
Build a WordPress theme from HTML5 template @ TelerikBuild a WordPress theme from HTML5 template @ Telerik
Build a WordPress theme from HTML5 template @ Telerik
 

Kürzlich hochgeladen

Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 

Kürzlich hochgeladen (20)

Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 

Writing your own WordPress themes and plugins

  • 1. Writing your own Themes and Plugins
  • 2. Stay-at-home mom, business owner, wife, WordPress plugin developer, mommy photographer, reef hobbyist, sushi lover, nerd @thestephwells
  • 3. Setup a local server Install a server (MAMP, WAMP, XAMPP, Desktop server) https://make.wordpress.org/core/handbook/installing-a-local-server/ Download WordPress and set it up https://make.wordpress.org/core/handbook/installing-wordpress-locally/ installing-from-a-zip-file/ Get a text editor (Sublime, Notepad ++, TextMate) For practice: Go to your local server folder (usually htdocs) and create a “testing” folder with an index.html file inside. Go to http://localhost/testing to see your blank page.
  • 4. Learn HTML & CSS Go to CodeAcademy.com and go through the 7-hour tutorial.
  • 5. Learn HTML & CSS Practice adding content to the testing/index.html file you created using your text editor. See the results at http://localhost/testing Use FireBug or Chrome developer tools to inspect a site you like. Make changes here for experimentation and they’ll be gone when you refresh the page.
  • 6. Create a Child Theme A child theme is an easy way to use a theme you like, and continue getting updates without losing any of your customizations.
  • 7. Create a Child Theme Add a new folder to your wordpress/wp-content/ themes folder and create a file called style.css inside it. Add the theme header at the beginning of your style.css, followed by your own CSS. https://gist.github.com/stephywells (my-child-theme)
  • 8. Create a Theme Add another folder to your wordpress/wp-content/ themes folder. Create style.css and index.php files Add the required header to the style.css (Exclude the Template: twentyfourteen line) The index.php must include the HTML structure, the head, loop, and footer. https://gist.github.com/stephywells (my-theme) If you load jQuery, use wp_enqueue_script Start with the Underscores theme
  • 9. Explore Hooks A hook allows your plugin to “hook into” WordPress, a parent theme, or another plugin at a specific time or place. Actions vs Filters https://developer.wordpress.org/reference/ Example: Display Widgets in_widget_form hook to insert and save options in a widget widget_display_callback hook to show and hide the widget
  • 10. “See a need, fill a need” Do you find yourself looking for functionality you can’t find? Are your clients requesting features for which there is no solution? Are you using a plugin that doesn’t ideally meet your needs? Do you reuse code for client projects with minor changes?
  • 11. Write it out What is the need? Concisely describe the need you would like to fill. What makes it different from existing options? What steps are required to meet this need? Think through the steps the user will take, and write down each one. (ie Check a box) Write down the tasks needed for each user step. (ie Add a box and save it)
  • 12. Display Widgets The need: An easy, foolproof way of choosing which widgets are shown on the page The steps required: Add options to the widgets Save the options Hide and show the front-end widgets add_filter(‘widget_display_callback’, ‘show_dw_widget’); add_action(‘in_widget_form’, ‘dw_hide_widget_options’, 10, 3); Need filled in 31 lines of code. Filling a need doesn’t need to be complicated.
  • 13.
  • 14. Formidable The (original) need: Separate the HTML from the content to allow clients to alter the content without messing with HTML The steps required: Back-end forms for collecting data Save and retrieve data
  • 15. You never know where a small need may lead.