SlideShare a Scribd company logo
Best Practices
On Making, Breaking, and Fixing WordPress Themes




    Philip Arthur Moore / Theme Wrangler at Automattic Inc.
WP_DEBUG

/**
 * For developers: WordPress debugging mode.
 *
 * Change this to true to enable the display of notices during development.
 * It is strongly recommended that plugin and theme developers use WP_DEBUG
 * in their development environments.
 */

define( 'WP_DEBUG', true );

/**
 * For developers: Logging WordPress errors.
 *
 * PHP errors and notices will be logged to the file /wp-content/debug.log
 */

define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

/**
 * Find more default constants in /wp-includes/default-constants.php
 * Link: http://codex.wordpress.org/Editing_wp-config.php
 */
SCRIPT_DEBUG


/**
 * For developers: Load development versions of all scripts.
 *
 * Change this to true to load all non-minified scripts and CSS. When
 * SCRIPT_DEBUG is set to true compression and concatenation are disabled.
 */

define( 'SCRIPT_DEBUG', true );

/**
 * Find more script-related constants in /wp-includes/script-loader.php
 * Link: http://codex.wordpress.org/Editing_wp-config.php
 */
Important Plugins for Theme Development


Debug Bar: Adds a debug menu to the toolbar that shows query, cache, and other
helpful debugging information.
Debug Bar Console: Adds a PHP/MySQL console to the debug bar.
Log Deprecated Notices: Logs the usage of deprecated files, functions, and
function arguments, offers the alternative if available, and identifies where the
deprecated functionality is being used.
Regenerate Thumbnails: Allows you to regenerate all thumbnails after changing
the thumbnail sizes.
Reveal IDs: Show post, page, category, tag, and link IDs in the Dashboard.
RTL Tester: Allows quick rtl.css testing by adding a switch to the toolbar.
Theme-Check: Tests a WordPress theme against the latest WP standards.
WordPress Importer: Bulk content migration from site to site.
Debug Bar Provides Useful Query Information
Debug Bar Reports PHP Notices and Warnings
Debug Bar Console
Log Deprecated Notices
Regenerate Thumbnails
Regenerate Thumbnails
Regenerate Thumbnails
Reveal IDs for Admin
RTL Tester Quickly Checks rtl.css
RTL Tester Activated
Theme-Check
Theme-Check Finds Theme Errors
Unit Testing is Vital
Your Theme Should Respond Well To:
Long Site Titles: e.g. The point of using Lorem Ipsum is
that it has a more-or-less normal distribution of letters, as
opposed to using 'Content here, content here', making it
look like readable English.


Long Site Descriptions: e.g. Lorem Ipsum is simply dummy
text of the printing and typesetting industry. Lorem Ipsum
has been the industry's standard dummy text ever since the
1500s, when an unknown printer took a galley of type and
scrambled it to make a type specimen book. It has survived
not only five centuries, but also the leap into electronic
typesetting, remaining essentially unchanged. It was
popularised in the 1960s with the release of Letraset sheets
containing Lorem Ipsum passages, and more recently with
desktop publishing software like Aldus PageMaker including
versions of Lorem Ipsum.
Your Theme Should Respond Well To:
Index and Archive Pagination i.e. paged=2 or page/2

Threaded and Paginated Comments

Super Large Images $content_width check

Non-Default Permalinks i.e. /%year%/%monthnum%/%day%/
%postname%/

Super-Short and Super-Long Menus custom and non-custom

Custom Front Page and Posts Page i.e. site.com/blog/

Non-Titled Posts and Non-Content Posts

Password-Protected Content

Widgets i.e. 0, 1, or 20 widgets
http://codex.wordpress.org/Theme_Unit_Test
Test For Built-In WordPress Functionality
add_theme_support( $feature );
// Add default posts and comments RSS feed links to <head>.
add_theme_support( 'automatic-feed-links' );

// This theme uses Featured Images (also known as post thumbnails) for per-
post/per-page Custom Header images
add_theme_support( 'post-thumbnails' );

// Add support for a variety of post formats
add_theme_support( 'post-formats', array( 'aside', 'link', 'gallery',
'status', 'quote', 'image' ) );

/**
 * Link: http://codex.wordpress.org/Function_Reference/add_theme_support
 */



          add_editor_style();
        add_custom_background();
          register_nav_menu();
       add_custom_image_header();
i18n
// i18n
load_theme_textdomain( 'autofocus', get_template_directory_uri() . '/languages' );

$locale = get_locale();
$locale_file = get_template_directory_uri() . "/languages/$locale.php";
if ( is_readable( $locale_file ) )
   require_once( $locale_file );

/**
 * Link: http://codex.wordpress.org/I18n_for_WordPress_Developers
 */
http://codex.wordpress.org/Theme_Review
Thanks

More Related Content

What's hot

Magento Meetup New Delhi- Console
Magento Meetup New Delhi- ConsoleMagento Meetup New Delhi- Console
Magento Meetup New Delhi- Console
Webkul Software Pvt. Ltd.
 
Installation of wordpress
Installation of wordpressInstallation of wordpress
Installation of wordpress
HAINIRMALRAJ
 
Getting started-with-zend-framework
Getting started-with-zend-frameworkGetting started-with-zend-framework
Getting started-with-zend-framework
Marcelo da Rocha
 
Aloha Editor usage example
Aloha Editor usage exampleAloha Editor usage example
Aloha Editor usage example
Laurin Herlt
 
Weblogic.deployer usage
Weblogic.deployer usageWeblogic.deployer usage
Weblogic.deployer usage
Bunty Ray
 
Akka sample using typesafe activator
Akka sample using typesafe activatorAkka sample using typesafe activator
Akka sample using typesafe activator
Vijayananda Mohire
 
Troubleshooting mule
Troubleshooting muleTroubleshooting mule
Troubleshooting mule
Son Nguyen
 
Web application testing with Selenium
Web application testing with SeleniumWeb application testing with Selenium
Web application testing with Selenium
Kerry Buckley
 
Web Application Development using MVC Framework Kohana
Web Application Development using MVC Framework KohanaWeb Application Development using MVC Framework Kohana
Web Application Development using MVC Framework Kohana
Arafat Rahman
 
Php
PhpPhp
Deploying and Running in Mule
Deploying and Running in MuleDeploying and Running in Mule
Deploying and Running in Mule
Khasim Saheb
 
Wordpress multisite
Wordpress multisiteWordpress multisite
Wordpress multisite
Plasterdog Web Design
 
Automated testing with Drupal
Automated testing with DrupalAutomated testing with Drupal
Automated testing with Drupal
Promet Source
 
Getting anypoint studios all versions
Getting anypoint studios all versionsGetting anypoint studios all versions
Getting anypoint studios all versions
Anirban Sen Chowdhary
 
Selenium 2: The Future of Selenium is now!
Selenium 2: The Future of Selenium is now!Selenium 2: The Future of Selenium is now!
Selenium 2: The Future of Selenium is now!
AutomatedTester
 
Installation of Joomla on Windows XP
Installation of Joomla on Windows XPInstallation of Joomla on Windows XP
Installation of Joomla on Windows XP
Rupesh Kumar
 
Apex code-fundamentals
Apex code-fundamentalsApex code-fundamentals
Apex code-fundamentals
Amit Sharma
 
Session on Selenium Powertools by Unmesh Gundecha
Session on Selenium Powertools by Unmesh GundechaSession on Selenium Powertools by Unmesh Gundecha
Session on Selenium Powertools by Unmesh Gundecha
Agile Testing Alliance
 
Integration with CMIS using Mule ESB
Integration with CMIS using Mule ESBIntegration with CMIS using Mule ESB
Integration with CMIS using Mule ESB
Sanjeet Pandey
 
Magento 2 Theme Trainning for Beginners | Magenest
Magento 2 Theme Trainning for Beginners | MagenestMagento 2 Theme Trainning for Beginners | Magenest
Magento 2 Theme Trainning for Beginners | Magenest
Magenest
 

What's hot (20)

Magento Meetup New Delhi- Console
Magento Meetup New Delhi- ConsoleMagento Meetup New Delhi- Console
Magento Meetup New Delhi- Console
 
Installation of wordpress
Installation of wordpressInstallation of wordpress
Installation of wordpress
 
Getting started-with-zend-framework
Getting started-with-zend-frameworkGetting started-with-zend-framework
Getting started-with-zend-framework
 
Aloha Editor usage example
Aloha Editor usage exampleAloha Editor usage example
Aloha Editor usage example
 
Weblogic.deployer usage
Weblogic.deployer usageWeblogic.deployer usage
Weblogic.deployer usage
 
Akka sample using typesafe activator
Akka sample using typesafe activatorAkka sample using typesafe activator
Akka sample using typesafe activator
 
Troubleshooting mule
Troubleshooting muleTroubleshooting mule
Troubleshooting mule
 
Web application testing with Selenium
Web application testing with SeleniumWeb application testing with Selenium
Web application testing with Selenium
 
Web Application Development using MVC Framework Kohana
Web Application Development using MVC Framework KohanaWeb Application Development using MVC Framework Kohana
Web Application Development using MVC Framework Kohana
 
Php
PhpPhp
Php
 
Deploying and Running in Mule
Deploying and Running in MuleDeploying and Running in Mule
Deploying and Running in Mule
 
Wordpress multisite
Wordpress multisiteWordpress multisite
Wordpress multisite
 
Automated testing with Drupal
Automated testing with DrupalAutomated testing with Drupal
Automated testing with Drupal
 
Getting anypoint studios all versions
Getting anypoint studios all versionsGetting anypoint studios all versions
Getting anypoint studios all versions
 
Selenium 2: The Future of Selenium is now!
Selenium 2: The Future of Selenium is now!Selenium 2: The Future of Selenium is now!
Selenium 2: The Future of Selenium is now!
 
Installation of Joomla on Windows XP
Installation of Joomla on Windows XPInstallation of Joomla on Windows XP
Installation of Joomla on Windows XP
 
Apex code-fundamentals
Apex code-fundamentalsApex code-fundamentals
Apex code-fundamentals
 
Session on Selenium Powertools by Unmesh Gundecha
Session on Selenium Powertools by Unmesh GundechaSession on Selenium Powertools by Unmesh Gundecha
Session on Selenium Powertools by Unmesh Gundecha
 
Integration with CMIS using Mule ESB
Integration with CMIS using Mule ESBIntegration with CMIS using Mule ESB
Integration with CMIS using Mule ESB
 
Magento 2 Theme Trainning for Beginners | Magenest
Magento 2 Theme Trainning for Beginners | MagenestMagento 2 Theme Trainning for Beginners | Magenest
Magento 2 Theme Trainning for Beginners | Magenest
 

Similar to Philip Arthur Moore: Best Practices — On Breaking and Fixing WordPress Themes

WordPress Theming 101
WordPress Theming 101WordPress Theming 101
WordPress Theming 101
Zero Point Development
 
WordPress 2.5 Overview - Rich Media Institute
WordPress 2.5 Overview - Rich Media InstituteWordPress 2.5 Overview - Rich Media Institute
WordPress 2.5 Overview - Rich Media Institute
Brendan Sera-Shriar
 
WordPress Ann Arbor: WP Tips and Tricks
WordPress Ann Arbor: WP Tips and TricksWordPress Ann Arbor: WP Tips and Tricks
WordPress Ann Arbor: WP Tips and Tricks
oneilldec
 
Getting started with WordPress development
Getting started with WordPress developmentGetting started with WordPress development
Getting started with WordPress development
Steve Mortiboy
 
Beginner's guide to drupal
Beginner's guide to drupalBeginner's guide to drupal
Beginner's guide to drupal
mayank.grd
 
W pthemes
W pthemesW pthemes
W pthemes
Becky Davis
 
Writing your own WordPress themes and plugins
Writing your own WordPress themes and pluginsWriting your own WordPress themes and plugins
Writing your own WordPress themes and plugins
Stephanie Wells
 
Introduction To Drupal
Introduction To DrupalIntroduction To Drupal
Introduction To Drupal
Lauren Roth
 
Getting Started With WordPress Development
Getting Started With WordPress DevelopmentGetting Started With WordPress Development
Getting Started With WordPress Development
Andy Brudtkuhl
 
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
 
WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1
Yoav Farhi
 
Asp.Net 2.0 Presentation
Asp.Net 2.0 PresentationAsp.Net 2.0 Presentation
Asp.Net 2.0 Presentation
sasidhar
 
WordPress 3.0 at DC PHP
WordPress 3.0 at DC PHPWordPress 3.0 at DC PHP
WordPress 3.0 at DC PHP
andrewnacin
 
CMS 101 Drupal
CMS 101 DrupalCMS 101 Drupal
CMS 101 Drupal
ggfergu
 
Intro to WordPress Plugin Development
Intro to WordPress Plugin DevelopmentIntro to WordPress Plugin Development
Intro to WordPress Plugin Development
Brad Williams
 
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
Mainak Goswami
 
WordPress Structure and Best Practices
WordPress Structure and Best PracticesWordPress Structure and Best Practices
WordPress Structure and Best Practices
markparolisi
 
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
David Carr
 
Connections customization lite
Connections customization liteConnections customization lite
Connections customization lite
Sharon James
 
WordPress Plugin Development- Rich Media Institute Workshop
WordPress Plugin Development- Rich Media Institute WorkshopWordPress Plugin Development- Rich Media Institute Workshop
WordPress Plugin Development- Rich Media Institute Workshop
Brendan Sera-Shriar
 

Similar to Philip Arthur Moore: Best Practices — On Breaking and Fixing WordPress Themes (20)

WordPress Theming 101
WordPress Theming 101WordPress Theming 101
WordPress Theming 101
 
WordPress 2.5 Overview - Rich Media Institute
WordPress 2.5 Overview - Rich Media InstituteWordPress 2.5 Overview - Rich Media Institute
WordPress 2.5 Overview - Rich Media Institute
 
WordPress Ann Arbor: WP Tips and Tricks
WordPress Ann Arbor: WP Tips and TricksWordPress Ann Arbor: WP Tips and Tricks
WordPress Ann Arbor: WP Tips and Tricks
 
Getting started with WordPress development
Getting started with WordPress developmentGetting started with WordPress development
Getting started with WordPress development
 
Beginner's guide to drupal
Beginner's guide to drupalBeginner's guide to drupal
Beginner's guide to drupal
 
W pthemes
W pthemesW pthemes
W pthemes
 
Writing your own WordPress themes and plugins
Writing your own WordPress themes and pluginsWriting your own WordPress themes and plugins
Writing your own WordPress themes and plugins
 
Introduction To Drupal
Introduction To DrupalIntroduction To Drupal
Introduction To Drupal
 
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 ...
 
WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1
 
Asp.Net 2.0 Presentation
Asp.Net 2.0 PresentationAsp.Net 2.0 Presentation
Asp.Net 2.0 Presentation
 
WordPress 3.0 at DC PHP
WordPress 3.0 at DC PHPWordPress 3.0 at DC PHP
WordPress 3.0 at DC PHP
 
CMS 101 Drupal
CMS 101 DrupalCMS 101 Drupal
CMS 101 Drupal
 
Intro to WordPress Plugin Development
Intro to WordPress Plugin DevelopmentIntro to WordPress Plugin Development
Intro to WordPress Plugin Development
 
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
 
WordPress Structure and Best Practices
WordPress Structure and Best PracticesWordPress Structure and Best Practices
WordPress Structure and Best Practices
 
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
 
Connections customization lite
Connections customization liteConnections customization lite
Connections customization lite
 
WordPress Plugin Development- Rich Media Institute Workshop
WordPress Plugin Development- Rich Media Institute WorkshopWordPress Plugin Development- Rich Media Institute Workshop
WordPress Plugin Development- Rich Media Institute Workshop
 

Recently uploaded

How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 

Recently uploaded (20)

How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 

Philip Arthur Moore: Best Practices — On Breaking and Fixing WordPress Themes

  • 1. Best Practices On Making, Breaking, and Fixing WordPress Themes Philip Arthur Moore / Theme Wrangler at Automattic Inc.
  • 2. WP_DEBUG /** * For developers: WordPress debugging mode. * * Change this to true to enable the display of notices during development. * It is strongly recommended that plugin and theme developers use WP_DEBUG * in their development environments. */ define( 'WP_DEBUG', true ); /** * For developers: Logging WordPress errors. * * PHP errors and notices will be logged to the file /wp-content/debug.log */ define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false ); /** * Find more default constants in /wp-includes/default-constants.php * Link: http://codex.wordpress.org/Editing_wp-config.php */
  • 3. SCRIPT_DEBUG /** * For developers: Load development versions of all scripts. * * Change this to true to load all non-minified scripts and CSS. When * SCRIPT_DEBUG is set to true compression and concatenation are disabled. */ define( 'SCRIPT_DEBUG', true ); /** * Find more script-related constants in /wp-includes/script-loader.php * Link: http://codex.wordpress.org/Editing_wp-config.php */
  • 4. Important Plugins for Theme Development Debug Bar: Adds a debug menu to the toolbar that shows query, cache, and other helpful debugging information. Debug Bar Console: Adds a PHP/MySQL console to the debug bar. Log Deprecated Notices: Logs the usage of deprecated files, functions, and function arguments, offers the alternative if available, and identifies where the deprecated functionality is being used. Regenerate Thumbnails: Allows you to regenerate all thumbnails after changing the thumbnail sizes. Reveal IDs: Show post, page, category, tag, and link IDs in the Dashboard. RTL Tester: Allows quick rtl.css testing by adding a switch to the toolbar. Theme-Check: Tests a WordPress theme against the latest WP standards. WordPress Importer: Bulk content migration from site to site.
  • 5. Debug Bar Provides Useful Query Information
  • 6. Debug Bar Reports PHP Notices and Warnings
  • 12. Reveal IDs for Admin
  • 13. RTL Tester Quickly Checks rtl.css
  • 18. Your Theme Should Respond Well To: Long Site Titles: e.g. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Long Site Descriptions: e.g. Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
  • 19. Your Theme Should Respond Well To: Index and Archive Pagination i.e. paged=2 or page/2 Threaded and Paginated Comments Super Large Images $content_width check Non-Default Permalinks i.e. /%year%/%monthnum%/%day%/ %postname%/ Super-Short and Super-Long Menus custom and non-custom Custom Front Page and Posts Page i.e. site.com/blog/ Non-Titled Posts and Non-Content Posts Password-Protected Content Widgets i.e. 0, 1, or 20 widgets
  • 21. Test For Built-In WordPress Functionality
  • 22. add_theme_support( $feature ); // Add default posts and comments RSS feed links to <head>. add_theme_support( 'automatic-feed-links' ); // This theme uses Featured Images (also known as post thumbnails) for per- post/per-page Custom Header images add_theme_support( 'post-thumbnails' ); // Add support for a variety of post formats add_theme_support( 'post-formats', array( 'aside', 'link', 'gallery', 'status', 'quote', 'image' ) ); /** * Link: http://codex.wordpress.org/Function_Reference/add_theme_support */ add_editor_style(); add_custom_background(); register_nav_menu(); add_custom_image_header();
  • 23. i18n
  • 24. // i18n load_theme_textdomain( 'autofocus', get_template_directory_uri() . '/languages' ); $locale = get_locale(); $locale_file = get_template_directory_uri() . "/languages/$locale.php"; if ( is_readable( $locale_file ) ) require_once( $locale_file ); /** * Link: http://codex.wordpress.org/I18n_for_WordPress_Developers */

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n