SlideShare une entreprise Scribd logo
1  sur  22
Oops! Common WordPress mistakes Jared Atchison  /jaredatchison.com/  @jaredatch 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch (and more)
Wait, who? 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch
Wait, who? 2008 Texas A&M Graduate (Technology Management) M-F, 8-5pm: Texas Transportation Institute WordPress! Independent WordPress Developer/Designer/Consultant Genesis! ThemeGarden Author http://www.themegarden.com/jared-atchison/ Featured StudioPress Developer http://dev.studiopress.com/developers/jared-atchison Theme frameworks++ 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch
Common Mistakes 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch
Adding JavaScript to themes 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch wp-content/themes/YourTheme/header.php
Adding JavaScript to themes 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch wp-content/themes/YourTheme/functions.php ,[object Object]
Can be useful (e.g. TypeKit),[object Object]
Adding JavaScript to themes 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch
WP packaged jQuery WordPress ships with jQuery (1.4.2) /wp-includes/js/jquery/jquery.js wp_enqueue_script(‘jquery’); Most often replaced with copy from Google CDN https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch
WP packaged jQuery WHY REMOVE? Wants/needs the newest version (e.g. 1.4.4) Wants to be on CDN (content delivery network) “decreased latency, increased parallelism, and better caching.” http://encosia.com/2008/12/10/3-reasons-why-you-should-let-google-host-jquery-for-you/ WTFBBQ!! jQuery.noConflict(); - no conflict mode http://codex.wordpress.org/Function_Reference/wp_enqueue_script#jQuery_noConflict_wrappers http://docs.jquery.com/Using_jQuery_with_Other_Libraries Doesn’t understand/use wp_enqueue_script(); 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch
WP packaged jQuery WHY NOT REMOVE? Adding JS the wrong way (first point) can cause chaos. Duplicate jQuery includes, OH NOES! ThemeForest.net … *face palm* Public CDN not always “be all and end all”. Relying on Google Look into W3 Total Cache Cross library compatibly often lost (no conflict) 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch
WP packaged jQuery IF NEEDED, DO IT CORRECTLY :) 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch http://codex.wordpress.org/Function_Reference/wp_enqueue_script#Load_a_default_WordPress_script_from_a_non-default_location
WP packaged jQuery WORKING WITH NO CONFLICT Virtually all popular jQuery scripts work in NC mode Yours can too! Use long-hand document ready… 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch
Including files Can be done many different ways (successfully). Certain methods for certain situations include(); require_once(); get_header(); get_sidebar(); and get_footer() get_template_part(); Since 3.0 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch
Using Permalinks WordPress gives great permalink control You can do almost anything – but should you? ZOMG! BUT SEO!!!!! Lies. http://www.weberz.com/blog/2009/06/seo-experts-give-wrong-advice-wordpress-permalinks Do not start permalinks with %category% or %postname% Pages + non-numerical starting permalinks = tons extra rules Custom post types excluded 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch
Using Permalinks %year% – The year of the post, four digits, for example 2004 %monthnum% – Month of the year, for example 05  %day% – Day of the month, for example 28  %hour% – Hour of the day, for example 15  %minute% – Minute of the hour, for example 43  %second% – Second of the minute, for example 33  %post_id% – The unique ID # of the post, for example 423  12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch “Use a permalink structure that does not start with a text based variable.  By doing this you will drastically reduce your risk of the problems listed above.  Here is a list of variables you can use that are not text based:” Further Reading: http://ottopress.com/2010/category-in-permalinks-considered-harmful/ Thanks to Josh and Bill
Building a theme Don’t start from scratch unless you must Build on top of something proven! “Blank” themes: Whiteboard, Sandbox, Starkers, etc Frameworks: Genesis!, Canvas, Builder, Hybrid, Headway, Thematic On top of popular themes: Twenty Ten Beware of Kubrick! http://wpcandy.com/presents/wordpress-theme-framework-comparison 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch
Troubleshooting (do it) Errors? Warnings? Notices? White-screen-of-death? DON’T PANIC. Deep breaths. Debug! Most problems you can debug yourself. define('WP_DEBUG', true); Deactivate plugins Deactivate themes 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch
Getting Help Know where to go for help. All sources are not equal! Codex ( http://codex.wordpress.org) WordPress forums/support (http://wordpress.org/support/) Twitter e.g. #wordpress (hit or miss) IRC, #wordpress on irc.freenode.net http://codex.wordpress.org/IRC “3rd party” WP Tavern, StudioPress forums, Google, etc 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch
Staying informed Twitter, #wordpress http://twitter.com/#!/jaredatch/wordpress Mailing lists, wp-testers, wp-hackers – with caution! Follow weekly developer meetings (IRC) http://wpdevel.wordpress.com/ Read developer blogs 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch
Helpful WordPress sites WP Candy WP Tavern Bill Erickson Stephanie Leary Yoast Ottopress MarjJaquith Dougal Campbell Lorelle Scribu Matt Mullenweg Justin Tadlock Alex Mills (Viper007Bond) Andrew Nacin 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch
Questions?  Jared Atchison  /jaredatchison.com/  @jaredatch 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch

Contenu connexe

En vedette (6)

Hits: A look at web metrics
Hits: A look at web metricsHits: A look at web metrics
Hits: A look at web metrics
 
Customizing WordPress from the Inside Out
Customizing WordPress from the Inside OutCustomizing WordPress from the Inside Out
Customizing WordPress from the Inside Out
 
Importing & Migrating
Importing & MigratingImporting & Migrating
Importing & Migrating
 
How to: Reporting Issues
How to: Reporting IssuesHow to: Reporting Issues
How to: Reporting Issues
 
Every Theme Sucks and Nobody Cares - #wcgr
Every Theme Sucks and Nobody Cares - #wcgrEvery Theme Sucks and Nobody Cares - #wcgr
Every Theme Sucks and Nobody Cares - #wcgr
 
Beyond Hits: Web Metrics beyond the simple
Beyond Hits: Web Metrics beyond the simpleBeyond Hits: Web Metrics beyond the simple
Beyond Hits: Web Metrics beyond the simple
 

Similaire à Common WordPress mistakes (and more)

All about word press
All about word pressAll about word press
All about word press
Dan Beil
 

Similaire à Common WordPress mistakes (and more) (20)

A Beginner's Guide to Wordpress - WordCamp Montreal 2011
A Beginner's Guide to Wordpress - WordCamp Montreal 2011A Beginner's Guide to Wordpress - WordCamp Montreal 2011
A Beginner's Guide to Wordpress - WordCamp Montreal 2011
 
A Beginner’s Guide to Wordpress - WordCamp Toronto 2011
A Beginner’s Guide to Wordpress - WordCamp Toronto 2011A Beginner’s Guide to Wordpress - WordCamp Toronto 2011
A Beginner’s Guide to Wordpress - WordCamp Toronto 2011
 
A Beginner's Guide to WordPress - WordCamp Toronto 2012
A Beginner's Guide to WordPress - WordCamp Toronto 2012A Beginner's Guide to WordPress - WordCamp Toronto 2012
A Beginner's Guide to WordPress - WordCamp Toronto 2012
 
WordPress Essentials for Beginners - YES Montreal December 2014
WordPress Essentials for Beginners - YES Montreal December 2014WordPress Essentials for Beginners - YES Montreal December 2014
WordPress Essentials for Beginners - YES Montreal December 2014
 
A Beginner's Guide to WordPress - WordCamp New York City 2012
A Beginner's Guide to WordPress - WordCamp New York City 2012A Beginner's Guide to WordPress - WordCamp New York City 2012
A Beginner's Guide to WordPress - WordCamp New York City 2012
 
WordPress for Beginners - West Island Women's Centre
WordPress for Beginners - West Island Women's CentreWordPress for Beginners - West Island Women's Centre
WordPress for Beginners - West Island Women's Centre
 
Beginners' Guide to WordPress
Beginners' Guide to WordPressBeginners' Guide to WordPress
Beginners' Guide to WordPress
 
A Beginner's Guide to WordPress - WordCamp Montreal 2012
A Beginner's Guide to WordPress - WordCamp Montreal 2012A Beginner's Guide to WordPress - WordCamp Montreal 2012
A Beginner's Guide to WordPress - WordCamp Montreal 2012
 
A Beginner's Guide to WordPress - Podcamp Toronto 2012
A Beginner's Guide to WordPress - Podcamp Toronto 2012A Beginner's Guide to WordPress - Podcamp Toronto 2012
A Beginner's Guide to WordPress - Podcamp Toronto 2012
 
Progressive enhancement
Progressive enhancementProgressive enhancement
Progressive enhancement
 
Wordpress Beyond A Blog Word Camp Toronto08
Wordpress Beyond A Blog Word Camp Toronto08Wordpress Beyond A Blog Word Camp Toronto08
Wordpress Beyond A Blog Word Camp Toronto08
 
TomatoCMS Workshop at Hue-Aptech IT center, 2010
TomatoCMS Workshop at Hue-Aptech IT center, 2010TomatoCMS Workshop at Hue-Aptech IT center, 2010
TomatoCMS Workshop at Hue-Aptech IT center, 2010
 
Word press!you're doing it wrong
Word press!you're doing it wrongWord press!you're doing it wrong
Word press!you're doing it wrong
 
WordPress! You're doing it wrong
WordPress! You're doing it wrongWordPress! You're doing it wrong
WordPress! You're doing it wrong
 
Joomla Day Austin Part 4
Joomla Day Austin Part 4Joomla Day Austin Part 4
Joomla Day Austin Part 4
 
Ant Build Tool
Ant Build ToolAnt Build Tool
Ant Build Tool
 
Accessible Websites With Lotus Notes/Domino, presented at the BLUG day event,...
Accessible Websites With Lotus Notes/Domino, presented at the BLUG day event,...Accessible Websites With Lotus Notes/Domino, presented at the BLUG day event,...
Accessible Websites With Lotus Notes/Domino, presented at the BLUG day event,...
 
Site Manager rocks!
Site Manager rocks!Site Manager rocks!
Site Manager rocks!
 
WordPress SEO - The Absolute Basics
WordPress SEO - The Absolute BasicsWordPress SEO - The Absolute Basics
WordPress SEO - The Absolute Basics
 
All about word press
All about word pressAll about word press
All about word press
 

Dernier

Dernier (20)

A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 

Common WordPress mistakes (and more)

  • 1. Oops! Common WordPress mistakes Jared Atchison /jaredatchison.com/ @jaredatch 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch (and more)
  • 2. Wait, who? 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch
  • 3. Wait, who? 2008 Texas A&M Graduate (Technology Management) M-F, 8-5pm: Texas Transportation Institute WordPress! Independent WordPress Developer/Designer/Consultant Genesis! ThemeGarden Author http://www.themegarden.com/jared-atchison/ Featured StudioPress Developer http://dev.studiopress.com/developers/jared-atchison Theme frameworks++ 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch
  • 4. Common Mistakes 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch
  • 5. Adding JavaScript to themes 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch wp-content/themes/YourTheme/header.php
  • 6.
  • 7.
  • 8. Adding JavaScript to themes 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch
  • 9. WP packaged jQuery WordPress ships with jQuery (1.4.2) /wp-includes/js/jquery/jquery.js wp_enqueue_script(‘jquery’); Most often replaced with copy from Google CDN https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch
  • 10. WP packaged jQuery WHY REMOVE? Wants/needs the newest version (e.g. 1.4.4) Wants to be on CDN (content delivery network) “decreased latency, increased parallelism, and better caching.” http://encosia.com/2008/12/10/3-reasons-why-you-should-let-google-host-jquery-for-you/ WTFBBQ!! jQuery.noConflict(); - no conflict mode http://codex.wordpress.org/Function_Reference/wp_enqueue_script#jQuery_noConflict_wrappers http://docs.jquery.com/Using_jQuery_with_Other_Libraries Doesn’t understand/use wp_enqueue_script(); 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch
  • 11. WP packaged jQuery WHY NOT REMOVE? Adding JS the wrong way (first point) can cause chaos. Duplicate jQuery includes, OH NOES! ThemeForest.net … *face palm* Public CDN not always “be all and end all”. Relying on Google Look into W3 Total Cache Cross library compatibly often lost (no conflict) 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch
  • 12. WP packaged jQuery IF NEEDED, DO IT CORRECTLY :) 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch http://codex.wordpress.org/Function_Reference/wp_enqueue_script#Load_a_default_WordPress_script_from_a_non-default_location
  • 13. WP packaged jQuery WORKING WITH NO CONFLICT Virtually all popular jQuery scripts work in NC mode Yours can too! Use long-hand document ready… 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch
  • 14. Including files Can be done many different ways (successfully). Certain methods for certain situations include(); require_once(); get_header(); get_sidebar(); and get_footer() get_template_part(); Since 3.0 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch
  • 15. Using Permalinks WordPress gives great permalink control You can do almost anything – but should you? ZOMG! BUT SEO!!!!! Lies. http://www.weberz.com/blog/2009/06/seo-experts-give-wrong-advice-wordpress-permalinks Do not start permalinks with %category% or %postname% Pages + non-numerical starting permalinks = tons extra rules Custom post types excluded 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch
  • 16. Using Permalinks %year% – The year of the post, four digits, for example 2004 %monthnum% – Month of the year, for example 05 %day% – Day of the month, for example 28 %hour% – Hour of the day, for example 15 %minute% – Minute of the hour, for example 43 %second% – Second of the minute, for example 33 %post_id% – The unique ID # of the post, for example 423 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch “Use a permalink structure that does not start with a text based variable. By doing this you will drastically reduce your risk of the problems listed above. Here is a list of variables you can use that are not text based:” Further Reading: http://ottopress.com/2010/category-in-permalinks-considered-harmful/ Thanks to Josh and Bill
  • 17. Building a theme Don’t start from scratch unless you must Build on top of something proven! “Blank” themes: Whiteboard, Sandbox, Starkers, etc Frameworks: Genesis!, Canvas, Builder, Hybrid, Headway, Thematic On top of popular themes: Twenty Ten Beware of Kubrick! http://wpcandy.com/presents/wordpress-theme-framework-comparison 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch
  • 18. Troubleshooting (do it) Errors? Warnings? Notices? White-screen-of-death? DON’T PANIC. Deep breaths. Debug! Most problems you can debug yourself. define('WP_DEBUG', true); Deactivate plugins Deactivate themes 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch
  • 19. Getting Help Know where to go for help. All sources are not equal! Codex ( http://codex.wordpress.org) WordPress forums/support (http://wordpress.org/support/) Twitter e.g. #wordpress (hit or miss) IRC, #wordpress on irc.freenode.net http://codex.wordpress.org/IRC “3rd party” WP Tavern, StudioPress forums, Google, etc 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch
  • 20. Staying informed Twitter, #wordpress http://twitter.com/#!/jaredatch/wordpress Mailing lists, wp-testers, wp-hackers – with caution! Follow weekly developer meetings (IRC) http://wpdevel.wordpress.com/ Read developer blogs 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch
  • 21. Helpful WordPress sites WP Candy WP Tavern Bill Erickson Stephanie Leary Yoast Ottopress MarjJaquith Dougal Campbell Lorelle Scribu Matt Mullenweg Justin Tadlock Alex Mills (Viper007Bond) Andrew Nacin 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch
  • 22. Questions? Jared Atchison /jaredatchison.com/ @jaredatch 12/4/2010 Oops! Common WordPress mistakes (and more) - Jared Atchison / @jaredatch