SlideShare ist ein Scribd-Unternehmen logo
1 von 51
Downloaden Sie, um offline zu lesen
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
Do you really

need a Child Theme?
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
Bego Mario Garde
Happy WordPress user since 7 years

Moderator in German support forums

General Translation Editor
… and this is my first WordCamp session!
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
Some general assumptions
Don't hack WordPress Core. Never.
Reasons: Updates overwrite your changes 

Your site gets unmaintainable

Difficult to provide support
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
Some general assumptions
Don't hack WordPress Themes.
Reasons: Updates overwrite your changes 

Your theme gets unmaintainable

Difficult to provide support
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
The obvious solution
Create a Child Theme!
Reason: Updates don't overwrite your changes.
Changes are easy to spot. 

WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
The obvious solution
Create a Child Theme!
Reason: Updates don't overwrite your changes.
Changes are easy to spot. 

Well, sort of.
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
.php .js .css
Child Theme
What about security issues?
.php .js .css
Parent Theme
.php
We copy templates of a Parent
Theme into the Child Theme and
tweak them as needed.
But what, if the Parent Theme had
a bug or even security issues?
The Child Theme Dilemma, T. Landsiedel 

http://bit.ly/1SWpJFZ
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
.php .js .css
Child Theme
What about security issues?
.php
.js .css
Parent Theme
.php
We copy templates of a Parent
Theme into the Child Theme and
tweak them as needed.
But what, if the Parent Theme had
a bug or even security issues?
The Child Theme Dilemma, T. Landsiedel 

http://bit.ly/1SWpJFZ
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
.php .js .css
Child Theme
What about security issues?
.php
.js .css
Parent Theme
.php
While the Parent Theme gets
fixed by the theme developer,
… the Child Theme keeps the bug.

(worst case: you don't even notice)
The Child Theme Dilemma, T. Landsiedel 

http://bit.ly/1SWpJFZ
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
.php .js .css
Child Theme
What about security issues?
.php
.js .css
Parent Theme
.php.php
While the Parent Theme gets
fixed by the theme developer,
… the Child Theme keeps the bug.

(worst case: you don't even notice)
The Child Theme Dilemma, T. Landsiedel 

http://bit.ly/1SWpJFZ
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
.php .js .css
Child Theme
Other issues?
.php
.js .css
Parent Theme
.php.php
Theme developers may change
function and class names.
Worst Case: Your website shows
an error message. Only.
(That's when your client calls!)
The Child Theme Dilemma, T. Landsiedel 

http://bit.ly/1SWpJFZ
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
Solution: Plugin Child Theme Check
Plugin Child Theme Check

https://wordpress.org/plugins/child-theme-check/
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
Parent Theme
Child Theme
Plugin Child Theme Check

https://wordpress.org/plugins/child-theme-check/
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
Parent Theme
Child Theme
Plugin Child Theme Check

https://wordpress.org/plugins/child-theme-check/
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
Plugin Child Theme Check
Great idea, great tool, but …
Theme Review Team not convinced 

about version numbers in templates
Changes still hard to maintain
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
More sites, more Child Themes
Things get a little messy, 

if you create a new Child Theme

for every new client.
How do you manage all of them 

after two months? After two years?
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
So… 
Do you really

need a Child Theme?
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
Step 1

Check your Theme Options. Really.
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
Photo "Strawberries" by @veeterzy, CC-0

https://unsplash.com/photos/OJJIaFZOeX4
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin https://wordpress.org/themes/twentysixteen
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
Theme options generally provide
you with more options, than you
realize. Play with them. Use them.
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
Step 2

Plugins for Custom CSS
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
Right Click ➞
Inspect Element
Try any value
Copy best result
Developer Tools
Chrome Developer Tools

https://developer.chrome.com/devtools
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
.site-header {
padding: 0;

}
.header-image {
margin: 0 0 5em 0;
img {
width: 100%;

height: auto;
}
}
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
Support for SASS
Add-on or 

Replacement
Revisions
Disables on 

syntax errors
Jetpack
Plugin Jetpack

https://wordpress.org/plugins/jetpack/
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
One Trick Pony
Easy and reliable
No revisions
No support for
SASS
Simple 

Custom CSS
Plugin Simple Custom CSS

https://wordpress.org/plugins/simple-custom-css/
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
Need to style
individual pages?
No Problem!
WordPress adds
the right body
Class
body Class
WP Codex: Function Reference/body class

http://bit.ly/1seFLBw
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
Need to style
individual pages?
No Problem!
WordPress adds
the right body
Class
body Class
WP Codex: Function Reference/body class

http://bit.ly/1seFLBw
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
Step 3

Add your own functions
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
Additional editor to
add any function
for front or back
end
Functions can be
exported
Error handling
Code Snippets
Plugin Code Snippets

https://wordpress.org/plugins/code-snippets/
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
Replace pluggable
functions
Code Snippets
if ( ! function_exists( 'twentysixteen_fonts_url' ) ) :
Plugin Code Snippets

https://wordpress.org/plugins/code-snippets/
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
Replace pluggable
functions
Code Snippets
if ( ! function_exists( 'twentysixteen_fonts_url' ) ) :
Plugin Code Snippets

https://wordpress.org/plugins/code-snippets/
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
Error handling
Plugin Code Snippets

https://wordpress.org/plugins/code-snippets/
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
Error handling
Plugin Code Snippets

https://wordpress.org/plugins/code-snippets/
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
Plugin Code Snippets

https://wordpress.org/plugins/code-snippets/
Hooks 

to the rescue
Need to add a
custom field?
You don't need
custom templates.
Bego Mario Garde

@pixolin
add_filter( 'the_content', 'append_cf_location' );
function append_cf_location( $content ) {
$location = get_field( 'location' );
$out = $content . 

	 	 '<div class="location">Location: <strong>' . 

	 	 $location . '</strong></div>' ;
return $out;
}
WordCamp Antwerp 2016
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
Step 4

Create Shortcodes for your own PHP
Bego Mario Garde

@pixolin
add_shortcode( 'portfolio', 'get_portfolio' );


function get_portfolio() {
$portfolios = new WP_Query( 'post_type=portfolio' );
if ( $portfolios->have_posts() ) {
	 while ( $portfolios->have_posts() ) {
	 	 $portfolios->the_post();
	 	 $out .= get_the_title();
	 }
}
return $out;
wp_reset_postdata();
}
WordCamp Antwerp 2016
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
Step 5

Bring your own JavaScript
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
Loads
frameworks
Error handling
Revisions
Custom
JavaScript
Editor
Plugin Custom JavaScript Editor

https://wordpress.org/plugins/custom-javascript-editor/
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
Loads
frameworks
Error handling
Revisions
Custom
JavaScript
Editor
Plugin Custom JavaScript Editor

https://wordpress.org/plugins/custom-javascript-editor/
Bego Mario Garde

@pixolin
jQuery(document).ready(function($){

	 $('#smoothup').on('click', function(){

	 	 $('html, body').animate({scrollTop:0}, 'fast');

	 	 return false;

	 	 });

});
add_action('twentysixteen_credits', 'scroll_up_link');

function scroll_up_link() {

echo '<a href="#" id="smoothup" class="siteinfo" 

	 title="Back to top">Back to Top /&nbsp;</a>';

}
WordCamp Antwerp 2016
in plugin Code Snippets
in plugin Custom JS Editor
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
Step 6

Performance matters

Concatenate JavaScript and CSS
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
Autoptimize
Aggregates and
minimizes JS,
CSS and HTML
Plugin Autoptimize

https://wordpress.org/plugins/autoptimize/
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
Autoptimize
Aggregates CSS and JavaScript
12 CSS files ➞ 1 CSS file

14 JavaScript files ➞ 1 JavaScript file
WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
My personal Conclusion

WordCamp Antwerp 2016
Bego Mario Garde

@pixolin
Is it wrong to use Child Themes?
Is it evil to use Child Themes?
No.
But you may have better alternatives.
Dank u wel · Merci

Weitere ähnliche Inhalte

Andere mochten auch

Careers Chamblee 2011
Careers Chamblee 2011Careers Chamblee 2011
Careers Chamblee 2011achamblee
 
R. federer vs s. querrey wimbledon gentlemen's 2015
R. federer vs s. querrey wimbledon   gentlemen's 2015R. federer vs s. querrey wimbledon   gentlemen's 2015
R. federer vs s. querrey wimbledon gentlemen's 2015allenallin
 
The WordPress developer's toolkit
The WordPress developer's toolkit The WordPress developer's toolkit
The WordPress developer's toolkit Ivelina Dimova
 
Service Design Introduction for Rainmakers
Service Design Introduction for RainmakersService Design Introduction for Rainmakers
Service Design Introduction for RainmakersLior Smith
 
Startup Meets Corporate – Intrapreneurial Culture Through Startup Collaboration
Startup Meets Corporate – Intrapreneurial Culture Through Startup CollaborationStartup Meets Corporate – Intrapreneurial Culture Through Startup Collaboration
Startup Meets Corporate – Intrapreneurial Culture Through Startup CollaborationCorporate Startup Summit
 
Pascal A. Miserez - Company Building für Transformationelle Innovation
Pascal A. Miserez - Company Building für Transformationelle InnovationPascal A. Miserez - Company Building für Transformationelle Innovation
Pascal A. Miserez - Company Building für Transformationelle InnovationCorporate Startup Summit
 
Session 14 - Working with table view and search bar
Session 14 - Working with table view and search barSession 14 - Working with table view and search bar
Session 14 - Working with table view and search barVu Tran Lam
 
12 Trends Influencing the Future of How We Work
12 Trends Influencing the Future of How We Work12 Trends Influencing the Future of How We Work
12 Trends Influencing the Future of How We WorkPaul Taylor
 
Agile Software Engineering and Design Thinking: Efficiency and Innovation in ...
Agile Software Engineering and Design Thinking: Efficiency and Innovation in ...Agile Software Engineering and Design Thinking: Efficiency and Innovation in ...
Agile Software Engineering and Design Thinking: Efficiency and Innovation in ...Tobias Schimmer
 
Session 9-10 - UI/UX design for iOS 7 application
Session 9-10 - UI/UX design for iOS 7 applicationSession 9-10 - UI/UX design for iOS 7 application
Session 9-10 - UI/UX design for iOS 7 applicationVu Tran Lam
 

Andere mochten auch (15)

James veach ppp
James veach pppJames veach ppp
James veach ppp
 
Careers Chamblee 2011
Careers Chamblee 2011Careers Chamblee 2011
Careers Chamblee 2011
 
Resume 2016-5
Resume 2016-5Resume 2016-5
Resume 2016-5
 
R. federer vs s. querrey wimbledon gentlemen's 2015
R. federer vs s. querrey wimbledon   gentlemen's 2015R. federer vs s. querrey wimbledon   gentlemen's 2015
R. federer vs s. querrey wimbledon gentlemen's 2015
 
mi16-wpseo
mi16-wpseomi16-wpseo
mi16-wpseo
 
The WordPress developer's toolkit
The WordPress developer's toolkit The WordPress developer's toolkit
The WordPress developer's toolkit
 
Value Focused Brainstorming
Value Focused BrainstormingValue Focused Brainstorming
Value Focused Brainstorming
 
Service Design Introduction for Rainmakers
Service Design Introduction for RainmakersService Design Introduction for Rainmakers
Service Design Introduction for Rainmakers
 
Startup Meets Corporate – Intrapreneurial Culture Through Startup Collaboration
Startup Meets Corporate – Intrapreneurial Culture Through Startup CollaborationStartup Meets Corporate – Intrapreneurial Culture Through Startup Collaboration
Startup Meets Corporate – Intrapreneurial Culture Through Startup Collaboration
 
Pascal A. Miserez - Company Building für Transformationelle Innovation
Pascal A. Miserez - Company Building für Transformationelle InnovationPascal A. Miserez - Company Building für Transformationelle Innovation
Pascal A. Miserez - Company Building für Transformationelle Innovation
 
Session 14 - Working with table view and search bar
Session 14 - Working with table view and search barSession 14 - Working with table view and search bar
Session 14 - Working with table view and search bar
 
Quality (Q), Cost (C), Delivery (D)---Q-C-D
Quality (Q), Cost (C), Delivery (D)---Q-C-DQuality (Q), Cost (C), Delivery (D)---Q-C-D
Quality (Q), Cost (C), Delivery (D)---Q-C-D
 
12 Trends Influencing the Future of How We Work
12 Trends Influencing the Future of How We Work12 Trends Influencing the Future of How We Work
12 Trends Influencing the Future of How We Work
 
Agile Software Engineering and Design Thinking: Efficiency and Innovation in ...
Agile Software Engineering and Design Thinking: Efficiency and Innovation in ...Agile Software Engineering and Design Thinking: Efficiency and Innovation in ...
Agile Software Engineering and Design Thinking: Efficiency and Innovation in ...
 
Session 9-10 - UI/UX design for iOS 7 application
Session 9-10 - UI/UX design for iOS 7 applicationSession 9-10 - UI/UX design for iOS 7 application
Session 9-10 - UI/UX design for iOS 7 application
 

Ähnlich wie Do you really need a Child Theme?

Intro to JavaScript - LA - July
Intro to JavaScript - LA - JulyIntro to JavaScript - LA - July
Intro to JavaScript - LA - JulyThinkful
 
Plugins Wordpress et optimisation de sites dans l'écran
Plugins Wordpress et optimisation de sites dans l'écranPlugins Wordpress et optimisation de sites dans l'écran
Plugins Wordpress et optimisation de sites dans l'écranMXO | agence totale
 
Build Your Own Website with HTML/CSS
Build Your Own Website with HTML/CSSBuild Your Own Website with HTML/CSS
Build Your Own Website with HTML/CSSThinkful
 
Build Your Own Website with HTML/CSS 8.15
Build Your Own Website with HTML/CSS 8.15Build Your Own Website with HTML/CSS 8.15
Build Your Own Website with HTML/CSS 8.15Thinkful
 
Build a Game with JavaScript - Pasadena July
Build a Game with JavaScript - Pasadena JulyBuild a Game with JavaScript - Pasadena July
Build a Game with JavaScript - Pasadena JulyThinkful
 
Switching from Canvas to Storefront
Switching from Canvas to StorefrontSwitching from Canvas to Storefront
Switching from Canvas to StorefrontHerb Miller
 
Wordpress course
Wordpress courseWordpress course
Wordpress courseSpy Seat
 
Intro to js august 31
Intro to js august 31Intro to js august 31
Intro to js august 31Thinkful
 
Build Your Own Website with HTML/CSS
Build Your Own Website with HTML/CSSBuild Your Own Website with HTML/CSS
Build Your Own Website with HTML/CSSThinkful
 
NARdiGras WordPress Camp - Themes & Plug-Ins
NARdiGras WordPress Camp - Themes & Plug-InsNARdiGras WordPress Camp - Themes & Plug-Ins
NARdiGras WordPress Camp - Themes & Plug-InsReggie Nicolay
 
NARdiGras WordPress Camp - Themes and Plug-Ins
NARdiGras WordPress Camp - Themes and Plug-InsNARdiGras WordPress Camp - Themes and Plug-Ins
NARdiGras WordPress Camp - Themes and Plug-InsRealtors Property Resource
 
Build your own website July 2017 LA
Build your own website July 2017 LABuild your own website July 2017 LA
Build your own website July 2017 LAThinkful
 
WordPress Custom Fields: Control your content presentation by breaking out of...
WordPress Custom Fields: Control your content presentation by breaking out of...WordPress Custom Fields: Control your content presentation by breaking out of...
WordPress Custom Fields: Control your content presentation by breaking out of...Denise Williams
 
Adobe Edge Animate and Captivate 8 Redux
Adobe Edge Animate and Captivate 8 ReduxAdobe Edge Animate and Captivate 8 Redux
Adobe Edge Animate and Captivate 8 ReduxKirsten Rourke
 
Build the Perfect WordPress Website
Build the Perfect WordPress WebsiteBuild the Perfect WordPress Website
Build the Perfect WordPress WebsiteSinergia Labs
 
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...Gáspár Nagy
 
Static site gen talk
Static site gen talkStatic site gen talk
Static site gen talkBen Adam
 
WordCamp Ireland - 40 tips for WordPress Optimization
WordCamp Ireland - 40 tips for WordPress OptimizationWordCamp Ireland - 40 tips for WordPress Optimization
WordCamp Ireland - 40 tips for WordPress OptimizationJoost de Valk
 

Ähnlich wie Do you really need a Child Theme? (20)

Intro to JavaScript
Intro to JavaScriptIntro to JavaScript
Intro to JavaScript
 
Intro to JavaScript - LA - July
Intro to JavaScript - LA - JulyIntro to JavaScript - LA - July
Intro to JavaScript - LA - July
 
Plugins Wordpress et optimisation de sites dans l'écran
Plugins Wordpress et optimisation de sites dans l'écranPlugins Wordpress et optimisation de sites dans l'écran
Plugins Wordpress et optimisation de sites dans l'écran
 
Build Your Own Website with HTML/CSS
Build Your Own Website with HTML/CSSBuild Your Own Website with HTML/CSS
Build Your Own Website with HTML/CSS
 
Build Your Own Website with HTML/CSS 8.15
Build Your Own Website with HTML/CSS 8.15Build Your Own Website with HTML/CSS 8.15
Build Your Own Website with HTML/CSS 8.15
 
Build a Game with JavaScript - Pasadena July
Build a Game with JavaScript - Pasadena JulyBuild a Game with JavaScript - Pasadena July
Build a Game with JavaScript - Pasadena July
 
Switching from Canvas to Storefront
Switching from Canvas to StorefrontSwitching from Canvas to Storefront
Switching from Canvas to Storefront
 
Wordpress course
Wordpress courseWordpress course
Wordpress course
 
Intro to js august 31
Intro to js august 31Intro to js august 31
Intro to js august 31
 
Build Your Own Website with HTML/CSS
Build Your Own Website with HTML/CSSBuild Your Own Website with HTML/CSS
Build Your Own Website with HTML/CSS
 
NARdiGras WordPress Camp - Themes & Plug-Ins
NARdiGras WordPress Camp - Themes & Plug-InsNARdiGras WordPress Camp - Themes & Plug-Ins
NARdiGras WordPress Camp - Themes & Plug-Ins
 
NARdiGras WordPress Camp - Themes and Plug-Ins
NARdiGras WordPress Camp - Themes and Plug-InsNARdiGras WordPress Camp - Themes and Plug-Ins
NARdiGras WordPress Camp - Themes and Plug-Ins
 
Build your own website July 2017 LA
Build your own website July 2017 LABuild your own website July 2017 LA
Build your own website July 2017 LA
 
WordPress Custom Fields: Control your content presentation by breaking out of...
WordPress Custom Fields: Control your content presentation by breaking out of...WordPress Custom Fields: Control your content presentation by breaking out of...
WordPress Custom Fields: Control your content presentation by breaking out of...
 
Cain & Obenland — Episode 4
Cain & Obenland — Episode 4Cain & Obenland — Episode 4
Cain & Obenland — Episode 4
 
Adobe Edge Animate and Captivate 8 Redux
Adobe Edge Animate and Captivate 8 ReduxAdobe Edge Animate and Captivate 8 Redux
Adobe Edge Animate and Captivate 8 Redux
 
Build the Perfect WordPress Website
Build the Perfect WordPress WebsiteBuild the Perfect WordPress Website
Build the Perfect WordPress Website
 
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...
 
Static site gen talk
Static site gen talkStatic site gen talk
Static site gen talk
 
WordCamp Ireland - 40 tips for WordPress Optimization
WordCamp Ireland - 40 tips for WordPress OptimizationWordCamp Ireland - 40 tips for WordPress Optimization
WordCamp Ireland - 40 tips for WordPress Optimization
 

Mehr von pixolin

WordPress auf Deutsch
WordPress auf DeutschWordPress auf Deutsch
WordPress auf Deutschpixolin
 
WordPress auf Deutsch – Der aktuelle Stand.
WordPress auf Deutsch – Der aktuelle Stand.WordPress auf Deutsch – Der aktuelle Stand.
WordPress auf Deutsch – Der aktuelle Stand.pixolin
 
Global WordPress Translation Day – WordPress Meetup FRA
Global WordPress Translation Day – WordPress Meetup FRAGlobal WordPress Translation Day – WordPress Meetup FRA
Global WordPress Translation Day – WordPress Meetup FRApixolin
 
WooCommerce
WooCommerceWooCommerce
WooCommercepixolin
 
Childthemes 2
Childthemes 2Childthemes 2
Childthemes 2pixolin
 
Childthemes mit git – WordPress MeetUp CGN
Childthemes mit git – WordPress MeetUp CGNChildthemes mit git – WordPress MeetUp CGN
Childthemes mit git – WordPress MeetUp CGNpixolin
 

Mehr von pixolin (6)

WordPress auf Deutsch
WordPress auf DeutschWordPress auf Deutsch
WordPress auf Deutsch
 
WordPress auf Deutsch – Der aktuelle Stand.
WordPress auf Deutsch – Der aktuelle Stand.WordPress auf Deutsch – Der aktuelle Stand.
WordPress auf Deutsch – Der aktuelle Stand.
 
Global WordPress Translation Day – WordPress Meetup FRA
Global WordPress Translation Day – WordPress Meetup FRAGlobal WordPress Translation Day – WordPress Meetup FRA
Global WordPress Translation Day – WordPress Meetup FRA
 
WooCommerce
WooCommerceWooCommerce
WooCommerce
 
Childthemes 2
Childthemes 2Childthemes 2
Childthemes 2
 
Childthemes mit git – WordPress MeetUp CGN
Childthemes mit git – WordPress MeetUp CGNChildthemes mit git – WordPress MeetUp CGN
Childthemes mit git – WordPress MeetUp CGN
 

Kürzlich hochgeladen

办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一z xss
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Sonam Pathan
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa494f574xmv
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012rehmti665
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Sonam Pathan
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Paul Calvano
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxDyna Gilbert
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作ys8omjxb
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书zdzoqco
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Dana Luther
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一Fs
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一Fs
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一Fs
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhimiss dipika
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMartaLoveguard
 

Kürzlich hochgeladen (20)

Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
 
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptx
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhi
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptx
 

Do you really need a Child Theme?

  • 1. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin Do you really
 need a Child Theme?
  • 2. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin Bego Mario Garde Happy WordPress user since 7 years
 Moderator in German support forums
 General Translation Editor … and this is my first WordCamp session!
  • 3. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin Some general assumptions Don't hack WordPress Core. Never. Reasons: Updates overwrite your changes 
 Your site gets unmaintainable
 Difficult to provide support
  • 4. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin Some general assumptions Don't hack WordPress Themes. Reasons: Updates overwrite your changes 
 Your theme gets unmaintainable
 Difficult to provide support
  • 5. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin The obvious solution Create a Child Theme! Reason: Updates don't overwrite your changes. Changes are easy to spot. 

  • 6. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin The obvious solution Create a Child Theme! Reason: Updates don't overwrite your changes. Changes are easy to spot. 
 Well, sort of.
  • 7. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin .php .js .css Child Theme What about security issues? .php .js .css Parent Theme .php We copy templates of a Parent Theme into the Child Theme and tweak them as needed. But what, if the Parent Theme had a bug or even security issues? The Child Theme Dilemma, T. Landsiedel 
 http://bit.ly/1SWpJFZ
  • 8. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin .php .js .css Child Theme What about security issues? .php .js .css Parent Theme .php We copy templates of a Parent Theme into the Child Theme and tweak them as needed. But what, if the Parent Theme had a bug or even security issues? The Child Theme Dilemma, T. Landsiedel 
 http://bit.ly/1SWpJFZ
  • 9. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin .php .js .css Child Theme What about security issues? .php .js .css Parent Theme .php While the Parent Theme gets fixed by the theme developer, … the Child Theme keeps the bug.
 (worst case: you don't even notice) The Child Theme Dilemma, T. Landsiedel 
 http://bit.ly/1SWpJFZ
  • 10. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin .php .js .css Child Theme What about security issues? .php .js .css Parent Theme .php.php While the Parent Theme gets fixed by the theme developer, … the Child Theme keeps the bug.
 (worst case: you don't even notice) The Child Theme Dilemma, T. Landsiedel 
 http://bit.ly/1SWpJFZ
  • 11. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin .php .js .css Child Theme Other issues? .php .js .css Parent Theme .php.php Theme developers may change function and class names. Worst Case: Your website shows an error message. Only. (That's when your client calls!) The Child Theme Dilemma, T. Landsiedel 
 http://bit.ly/1SWpJFZ
  • 12. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin Solution: Plugin Child Theme Check Plugin Child Theme Check
 https://wordpress.org/plugins/child-theme-check/
  • 13. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin Parent Theme Child Theme Plugin Child Theme Check
 https://wordpress.org/plugins/child-theme-check/
  • 14. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin Parent Theme Child Theme Plugin Child Theme Check
 https://wordpress.org/plugins/child-theme-check/
  • 15. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin Plugin Child Theme Check Great idea, great tool, but … Theme Review Team not convinced 
 about version numbers in templates Changes still hard to maintain
  • 16. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin More sites, more Child Themes Things get a little messy, 
 if you create a new Child Theme
 for every new client. How do you manage all of them 
 after two months? After two years?
  • 17. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin So…  Do you really
 need a Child Theme?
  • 18. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin Step 1
 Check your Theme Options. Really.
  • 19. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin Photo "Strawberries" by @veeterzy, CC-0
 https://unsplash.com/photos/OJJIaFZOeX4
  • 20. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin https://wordpress.org/themes/twentysixteen
  • 21. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin
  • 22. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin Theme options generally provide you with more options, than you realize. Play with them. Use them.
  • 23. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin Step 2
 Plugins for Custom CSS
  • 24. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin
  • 25. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin
  • 26. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin Right Click ➞ Inspect Element Try any value Copy best result Developer Tools Chrome Developer Tools
 https://developer.chrome.com/devtools
  • 27. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin .site-header { padding: 0;
 } .header-image { margin: 0 0 5em 0; img { width: 100%;
 height: auto; } }
  • 28. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin Support for SASS Add-on or 
 Replacement Revisions Disables on 
 syntax errors Jetpack Plugin Jetpack
 https://wordpress.org/plugins/jetpack/
  • 29. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin One Trick Pony Easy and reliable No revisions No support for SASS Simple 
 Custom CSS Plugin Simple Custom CSS
 https://wordpress.org/plugins/simple-custom-css/
  • 30. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin Need to style individual pages? No Problem! WordPress adds the right body Class body Class WP Codex: Function Reference/body class
 http://bit.ly/1seFLBw
  • 31. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin Need to style individual pages? No Problem! WordPress adds the right body Class body Class WP Codex: Function Reference/body class
 http://bit.ly/1seFLBw
  • 32. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin Step 3
 Add your own functions
  • 33. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin Additional editor to add any function for front or back end Functions can be exported Error handling Code Snippets Plugin Code Snippets
 https://wordpress.org/plugins/code-snippets/
  • 34. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin Replace pluggable functions Code Snippets if ( ! function_exists( 'twentysixteen_fonts_url' ) ) : Plugin Code Snippets
 https://wordpress.org/plugins/code-snippets/
  • 35. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin Replace pluggable functions Code Snippets if ( ! function_exists( 'twentysixteen_fonts_url' ) ) : Plugin Code Snippets
 https://wordpress.org/plugins/code-snippets/
  • 36. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin
  • 37. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin Error handling Plugin Code Snippets
 https://wordpress.org/plugins/code-snippets/
  • 38. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin Error handling Plugin Code Snippets
 https://wordpress.org/plugins/code-snippets/
  • 39. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin Plugin Code Snippets
 https://wordpress.org/plugins/code-snippets/ Hooks 
 to the rescue Need to add a custom field? You don't need custom templates.
  • 40. Bego Mario Garde
 @pixolin add_filter( 'the_content', 'append_cf_location' ); function append_cf_location( $content ) { $location = get_field( 'location' ); $out = $content . 
 '<div class="location">Location: <strong>' . 
 $location . '</strong></div>' ; return $out; } WordCamp Antwerp 2016
  • 41. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin Step 4
 Create Shortcodes for your own PHP
  • 42. Bego Mario Garde
 @pixolin add_shortcode( 'portfolio', 'get_portfolio' ); 
 function get_portfolio() { $portfolios = new WP_Query( 'post_type=portfolio' ); if ( $portfolios->have_posts() ) { while ( $portfolios->have_posts() ) { $portfolios->the_post(); $out .= get_the_title(); } } return $out; wp_reset_postdata(); } WordCamp Antwerp 2016
  • 43. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin Step 5
 Bring your own JavaScript
  • 44. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin Loads frameworks Error handling Revisions Custom JavaScript Editor Plugin Custom JavaScript Editor
 https://wordpress.org/plugins/custom-javascript-editor/
  • 45. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin Loads frameworks Error handling Revisions Custom JavaScript Editor Plugin Custom JavaScript Editor
 https://wordpress.org/plugins/custom-javascript-editor/
  • 46. Bego Mario Garde
 @pixolin jQuery(document).ready(function($){
 $('#smoothup').on('click', function(){
 $('html, body').animate({scrollTop:0}, 'fast');
 return false;
 });
 }); add_action('twentysixteen_credits', 'scroll_up_link');
 function scroll_up_link() {
 echo '<a href="#" id="smoothup" class="siteinfo" 
 title="Back to top">Back to Top /&nbsp;</a>';
 } WordCamp Antwerp 2016 in plugin Code Snippets in plugin Custom JS Editor
  • 47. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin Step 6
 Performance matters
 Concatenate JavaScript and CSS
  • 48. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin Autoptimize Aggregates and minimizes JS, CSS and HTML Plugin Autoptimize
 https://wordpress.org/plugins/autoptimize/
  • 49. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin Autoptimize Aggregates CSS and JavaScript 12 CSS files ➞ 1 CSS file
 14 JavaScript files ➞ 1 JavaScript file
  • 50. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin My personal Conclusion

  • 51. WordCamp Antwerp 2016 Bego Mario Garde
 @pixolin Is it wrong to use Child Themes? Is it evil to use Child Themes? No. But you may have better alternatives. Dank u wel · Merci