{"id":26783,"date":"2017-05-25T16:16:45","date_gmt":"2017-05-25T21:16:45","guid":{"rendered":"https:\/\/wpengine.com\/?p=26783"},"modified":"2017-05-31T10:00:46","modified_gmt":"2017-05-31T15:00:46","slug":"chrome-developer-tools-wordpress-development","status":"publish","type":"post","link":"https:\/\/wpengine.com\/resources\/chrome-developer-tools-wordpress-development\/","title":{"rendered":"5 Ways Chrome Developer Tools Can Improve Your WordPress Development"},"content":{"rendered":"<p>Whether you are working with a pre-designed theme file or building a brand new site from scratch, utilizing Chrome Developer Tools for WordPress development can significantly improve your workflow, efficiency, and ease of mind in troubleshooting bugs and issues. While this post will specifically focus on Google Chrome Developer Tools, many of these features and workflows will also apply to the equivalent tools offered by Firefox.<\/p>\n<h2>What are the Google Chrome Developer Tools?<\/h2>\n<p>Developer Tools is a set of software applications that come pre-installed with Google Chrome, which offer incredibly useful features for analyzing and improving the structure of your websites. There are about 10 different panels, each focused on a different component (Elements, Console, Network, Performance, Security, etc.).<\/p>\n<p>You can access the developer tools by typing Command + Option + I on OS X or Control Shift I on Windows and Linux.<\/p>\n<h2>5 Ways Developer Tools can improve your WordPress Development<\/h2>\n<h5>1. Edit HTML, CSS and PHP code directly in the browser<\/h5>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-26803\" src=\"https:\/\/wpengine.com\/wp-content\/uploads\/2017\/05\/dev-tools1.png\" alt=\"\" width=\"977\" height=\"800\" srcset=\"https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2017\/05\/dev-tools1.png 977w, https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2017\/05\/dev-tools1-300x246.png 300w, https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2017\/05\/dev-tools1-768x629.png 768w, https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2017\/05\/dev-tools1-176x144.png 176w, https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2017\/05\/dev-tools1-611x500.png 611w\" sizes=\"auto, (max-width: 977px) 100vw, 977px\" \/><\/p>\n<p>Using the <strong>Elements<\/strong> panel in Developer Tools, you can preview changes to your code directly in the browser, before making the actual changes to your source code. Having a layout issue or want to try out some different colors? You can type these into the Elements panel and immediately see the changes. In some instances, you can even do this with PHP and JavaScript files.<\/p>\n<p>The Elements panel displays all of the HTML code of the page, along with all CSS styles being applied to a selected section of HTML code. One of those most useful aspects of this feature is the ability to simply hover over a given element on the page, and Developer Tools will highlight the corresponding HTML in the source code.<\/p>\n<h5>2. Find and eliminate conflicting CSS rules<\/h5>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-26805 size-full\" src=\"https:\/\/wpengine.com\/wp-content\/uploads\/2017\/05\/dev-tools2.png\" alt=\"\" width=\"323\" height=\"622\" srcset=\"https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2017\/05\/dev-tools2.png 323w, https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2017\/05\/dev-tools2-156x300.png 156w, https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2017\/05\/dev-tools2-75x144.png 75w, https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2017\/05\/dev-tools2-260x500.png 260w\" sizes=\"auto, (max-width: 323px) 100vw, 323px\" \/>As a site&#8217;s CSS codebase grows (and even more so when using someone else&#8217;s themefile or utilizing multiple stylesheets), it can become increasingly difficult to track down all the CSS rules being applied to a given element. The Elements panel in Developer Tools makes this immensely easy, displaying not only all the rules applied to an HTML element but also all the other elements the rule is applied to.<\/p>\n<h5>3. Test mobile and tablet layouts<\/h5>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-26808\" src=\"https:\/\/wpengine.com\/wp-content\/uploads\/2017\/05\/dev-tools3.png\" alt=\"\" width=\"974\" height=\"801\" srcset=\"https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2017\/05\/dev-tools3.png 974w, https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2017\/05\/dev-tools3-300x247.png 300w, https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2017\/05\/dev-tools3-768x632.png 768w, https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2017\/05\/dev-tools3-175x144.png 175w, https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2017\/05\/dev-tools3-608x500.png 608w\" sizes=\"auto, (max-width: 974px) 100vw, 974px\" \/><\/p>\n<p>While ideally, you should always test your sites on as many different available devices as possible, the <strong>Device Mode<\/strong> in Developer Tools makes it possible to see a virtual model of how your page will appear on a given device. There are preset configurations for all the most common iOS and Android devices, although custom configurations are also possible.<\/p>\n<h5>4. Inspect a WordPress theme before purchase<\/h5>\n<p>If you really want to take a look at a WordPress theme you&#8217;re considering for a project, you can utilize the Developer Tools to really analyze it before making a decision. You can study the structure of the site, assets used, performance, and any other issues you may want to consider before making a theme purchase.<\/p>\n<h5>5. Learn how others are writing good code<\/h5>\n<p>As a web developer, one of the most effective ways of improving your coding abilities is by looking at the source code of sites that you admire. Developer Tools makes it instantly clear how your favorite sites are styled and put together.<\/p>\n<hr \/>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-26810 size-thumbnail\" src=\"https:\/\/wpengine.com\/wp-content\/uploads\/2017\/05\/Nicholas-Morera-150x150.png\" alt=\"\" width=\"150\" height=\"150\" srcset=\"https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2017\/05\/Nicholas-Morera-150x150.png 150w, https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2017\/05\/Nicholas-Morera-300x300.png 300w, https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2017\/05\/Nicholas-Morera-144x144.png 144w, https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2017\/05\/Nicholas-Morera.png 366w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><em>Nicholas Morera is a Lead Project Manager for <a href=\"https:\/\/sunlightmedia.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">Sunlight Media<\/a> in Los Angeles and provides ongoing support and maintenance to clients using the WordPress platform.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Whether you are working with a pre-designed theme file or building a brand new site from scratch, utilizing Chrome Developer Tools for WordPress development can significantly improve your workflow, efficiency, and ease of mind in troubleshooting bugs and issues. While this post will specifically focus on Google Chrome Developer Tools, many of these features and<span class=\"tile__ellipses\">&hellip;<\/span><span class=\"tile__ellipses--animated\"><\/span><\/p>\n","protected":false},"author":169,"featured_media":26799,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-26783","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-development"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Using Chrome Developer Tools For WordPress Development<\/title>\n<meta name=\"description\" content=\"Whether you&#039;re working with a pre-designed theme file or building a brand new site, utilizing Chrome Developer Tools for WordPress development...\" \/>\n<meta name=\"robots\" content=\"noindex, follow\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using Chrome Developer Tools For WordPress Development\" \/>\n<meta property=\"og:description\" content=\"Whether you&#039;re working with a pre-designed theme file or building a brand new site, utilizing Chrome Developer Tools for WordPress development...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wpengine.com\/resources\/chrome-developer-tools-wordpress-development\/\" \/>\n<meta property=\"og:site_name\" content=\"WP Engine\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/wpengine\" \/>\n<meta property=\"article:published_time\" content=\"2017-05-25T21:16:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-05-31T15:00:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2017\/05\/chrome-tools-wordpress-hero.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"930\" \/>\n\t<meta property=\"og:image:height\" content=\"386\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Nicholas Morera\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@wpengine\" \/>\n<meta name=\"twitter:site\" content=\"@wpengine\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nicholas Morera\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/wpengine.com\/resources\/chrome-developer-tools-wordpress-development\/\",\"url\":\"https:\/\/wpengine.com\/resources\/chrome-developer-tools-wordpress-development\/\",\"name\":\"Using Chrome Developer Tools For WordPress Development\",\"isPartOf\":{\"@id\":\"https:\/\/wpengine.com\/resources\/#website\"},\"datePublished\":\"2017-05-25T21:16:45+00:00\",\"dateModified\":\"2017-05-31T15:00:46+00:00\",\"author\":{\"@id\":\"https:\/\/wpengine.com\/resources\/#\/schema\/person\/401bcfa531b26f0a9c912c52302723bb\"},\"description\":\"Whether you're working with a pre-designed theme file or building a brand new site, utilizing Chrome Developer Tools for WordPress development...\",\"breadcrumb\":{\"@id\":\"https:\/\/wpengine.com\/resources\/chrome-developer-tools-wordpress-development\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/wpengine.com\/resources\/chrome-developer-tools-wordpress-development\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/wpengine.com\/resources\/chrome-developer-tools-wordpress-development\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/wpengine.com\/resources\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"5 Ways Chrome Developer Tools Can Improve Your WordPress Development\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/wpengine.com\/resources\/#website\",\"url\":\"https:\/\/wpengine.com\/resources\/\",\"name\":\"WP Engine\",\"description\":\"Managed Hosting for WordPress\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/wpengine.com\/resources\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/wpengine.com\/resources\/#\/schema\/person\/401bcfa531b26f0a9c912c52302723bb\",\"name\":\"Nicholas Morera\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/wpengine.com\/resources\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/fa879df31502b97a673bf142eff80782d35e17ecf1617676d48c0f096e311e49?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/fa879df31502b97a673bf142eff80782d35e17ecf1617676d48c0f096e311e49?s=96&d=mm&r=g\",\"caption\":\"Nicholas Morera\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using Chrome Developer Tools For WordPress Development","description":"Whether you're working with a pre-designed theme file or building a brand new site, utilizing Chrome Developer Tools for WordPress development...","robots":{"index":"noindex","follow":"follow"},"og_locale":"en_US","og_type":"article","og_title":"Using Chrome Developer Tools For WordPress Development","og_description":"Whether you're working with a pre-designed theme file or building a brand new site, utilizing Chrome Developer Tools for WordPress development...","og_url":"https:\/\/wpengine.com\/resources\/chrome-developer-tools-wordpress-development\/","og_site_name":"WP Engine","article_publisher":"https:\/\/www.facebook.com\/wpengine","article_published_time":"2017-05-25T21:16:45+00:00","article_modified_time":"2017-05-31T15:00:46+00:00","og_image":[{"width":930,"height":386,"url":"https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2017\/05\/chrome-tools-wordpress-hero.jpg","type":"image\/jpeg"}],"author":"Nicholas Morera","twitter_card":"summary_large_image","twitter_creator":"@wpengine","twitter_site":"@wpengine","twitter_misc":{"Written by":"Nicholas Morera","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/wpengine.com\/resources\/chrome-developer-tools-wordpress-development\/","url":"https:\/\/wpengine.com\/resources\/chrome-developer-tools-wordpress-development\/","name":"Using Chrome Developer Tools For WordPress Development","isPartOf":{"@id":"https:\/\/wpengine.com\/resources\/#website"},"datePublished":"2017-05-25T21:16:45+00:00","dateModified":"2017-05-31T15:00:46+00:00","author":{"@id":"https:\/\/wpengine.com\/resources\/#\/schema\/person\/401bcfa531b26f0a9c912c52302723bb"},"description":"Whether you're working with a pre-designed theme file or building a brand new site, utilizing Chrome Developer Tools for WordPress development...","breadcrumb":{"@id":"https:\/\/wpengine.com\/resources\/chrome-developer-tools-wordpress-development\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wpengine.com\/resources\/chrome-developer-tools-wordpress-development\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/wpengine.com\/resources\/chrome-developer-tools-wordpress-development\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wpengine.com\/resources\/"},{"@type":"ListItem","position":2,"name":"5 Ways Chrome Developer Tools Can Improve Your WordPress Development"}]},{"@type":"WebSite","@id":"https:\/\/wpengine.com\/resources\/#website","url":"https:\/\/wpengine.com\/resources\/","name":"WP Engine","description":"Managed Hosting for WordPress","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wpengine.com\/resources\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/wpengine.com\/resources\/#\/schema\/person\/401bcfa531b26f0a9c912c52302723bb","name":"Nicholas Morera","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wpengine.com\/resources\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/fa879df31502b97a673bf142eff80782d35e17ecf1617676d48c0f096e311e49?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/fa879df31502b97a673bf142eff80782d35e17ecf1617676d48c0f096e311e49?s=96&d=mm&r=g","caption":"Nicholas Morera"}}]}},"acf":[],"_links":{"self":[{"href":"https:\/\/wpengine.com\/resources\/wp-json\/wp\/v2\/posts\/26783","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpengine.com\/resources\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpengine.com\/resources\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpengine.com\/resources\/wp-json\/wp\/v2\/users\/169"}],"replies":[{"embeddable":true,"href":"https:\/\/wpengine.com\/resources\/wp-json\/wp\/v2\/comments?post=26783"}],"version-history":[{"count":0,"href":"https:\/\/wpengine.com\/resources\/wp-json\/wp\/v2\/posts\/26783\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpengine.com\/resources\/wp-json\/wp\/v2\/media\/26799"}],"wp:attachment":[{"href":"https:\/\/wpengine.com\/resources\/wp-json\/wp\/v2\/media?parent=26783"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpengine.com\/resources\/wp-json\/wp\/v2\/categories?post=26783"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpengine.com\/resources\/wp-json\/wp\/v2\/tags?post=26783"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}