<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Web Training Wheels</title>
	<atom:link href="http://webtrainingwheels.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://webtrainingwheels.com</link>
	<description>WordPress &#38; Online Marketing Training // lucy@webtrainingwheels.com</description>
	<lastBuildDate>Sat, 05 Apr 2025 00:41:48 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.5</generator>

<image>
	<url>https://webtrainingwheels.com/wp-content/uploads/2015/03/cropped-wtw-fav-120-32x32.png</url>
	<title>Web Training Wheels</title>
	<link>https://webtrainingwheels.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to Edit Homepage Content in a WordPress Block Theme</title>
		<link>https://webtrainingwheels.com/how-to-edit-homepage-content-in-a-wordpress-block-theme/</link>
		
		<dc:creator><![CDATA[Lucy]]></dc:creator>
		<pubDate>Sat, 05 Apr 2025 00:40:38 +0000</pubDate>
				<category><![CDATA[WordPress Tutorials - Basic]]></category>
		<category><![CDATA[block themes]]></category>
		<category><![CDATA[full site editing]]></category>
		<guid isPermaLink="false">https://webtrainingwheels.com/?p=6347</guid>

					<description><![CDATA[A common pain point amongst new users of Block Themes is managing homepage content &#8211; how and where to edit it and if that should be done in the template itself. The problem with some block themes is that they put their demo content directly into the template. This can override whatever content you set ... <p class="read-more-container"><a title="How to Edit Homepage Content in a WordPress Block Theme" class="read-more button" href="https://webtrainingwheels.com/how-to-edit-homepage-content-in-a-wordpress-block-theme/#more-6347" aria-label="Read more about How to Edit Homepage Content in a WordPress Block Theme">Read more</a></p>]]></description>
										<content:encoded><![CDATA[<div class="wp-block-image">
<figure class="aligncenter size-full"><img fetchpriority="high" decoding="async" width="700" height="300" src="https://webtrainingwheels.com/wp-content/uploads/2025/04/block-themes-homepage-700x300-1.jpg" alt="" class="wp-image-6471" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/04/block-themes-homepage-700x300-1.jpg 700w, https://webtrainingwheels.com/wp-content/uploads/2025/04/block-themes-homepage-700x300-1-500x214.jpg 500w" sizes="(max-width: 700px) 100vw, 700px" /></figure></div>


<p></p>



<p>A common pain point amongst new users of Block Themes is managing homepage content &#8211; how and where to edit it and if that should be done in the template itself.</p>



<p>The problem with some block themes is that they put their demo content directly into the template. This can override whatever content you set to show on your homepage. And if you don&#8217;t know better, you&#8217;ll start editing the template to add your own content.</p>



<span id="more-6347"></span>



<p><strong>Template Editing vs. Page Editing</strong></p>



<p>WordPress maintains a separation between content and design. </p>



<p>That means that content like your page-specific text/images etc needs to be placed in the page editor.</p>



<p>The layout and design of your site is managed from the site editor, using templates.</p>



<p>It&#8217;s important not to directly edit the template and add your content there. Otherwise it&#8217;ll cause you headaches and WordPress won&#8217;t act the way you expect.</p>



<p>Here are the 2 biggest problems I&#8217;ve encountered when trying to get started with block themes, and how to fix them. </p>



<p><strong>1. Your own homepage content is overridden by theme content.</strong></p>



<p>You have made some posts and pages already in WordPress. Your site currently uses a static page for the homepage with posts displayed on a dedicated blog page. </p>



<p>You decide to try out a block themes. You install one, let&#8217;s say <a href="https://wordpress.org/themes/beaumont/" target="_blank" rel="noopener" title="">Beaumont</a>.</p>



<p>You activate the theme and visit your homepage. You&#8217;re expecting to see the content you&#8217;ve already carefully crafted.</p>



<p>Instead you find the Beaumont blog layout! </p>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/04/beaumont-reading-settings-1.jpg"><img decoding="async" width="1024" height="500" src="https://webtrainingwheels.com/wp-content/uploads/2025/04/beaumont-reading-settings-1-1024x500.jpg" alt="" class="wp-image-6453" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/04/beaumont-reading-settings-1-1024x500.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2025/04/beaumont-reading-settings-1-500x244.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/04/beaumont-reading-settings-1-768x375.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2025/04/beaumont-reading-settings-1.jpg 1200w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>Likewise, if you have your homepage set to show posts, but install a theme like <a href="https://wordpress.org/themes/spectra-one/" title="">Spectra</a> or <a href="https://wordpress.org/themes/frost/" title="">Frost</a>, you will find that your posts are nowhere in sight, and you have the theme demo content instead.</p>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/03/frost-homepage.jpg"><img decoding="async" width="1024" height="457" src="https://webtrainingwheels.com/wp-content/uploads/2025/03/frost-homepage-1024x457.jpg" alt="" class="wp-image-6447" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/03/frost-homepage-1024x457.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2025/03/frost-homepage-500x223.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/03/frost-homepage-768x343.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2025/03/frost-homepage.jpg 1200w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p></p>



<p><strong>2. You don&#8217;t realize the demo content is in a template and you edit it directly</strong></p>



<p>You don&#8217;t find the usual <em>Edit Page</em> link in the toolbar. So you click <em>Edit Site</em>, which seems logical.</p>



<p>Then you get to work editing, without even realizing that you&#8217;re editing the template itself!</p>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/04/frost-edit-site-link.jpg"><img decoding="async" width="1024" height="401" src="https://webtrainingwheels.com/wp-content/uploads/2025/04/frost-edit-site-link-1024x401.jpg" alt="" class="wp-image-6479" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/04/frost-edit-site-link-1024x401.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2025/04/frost-edit-site-link-500x196.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/04/frost-edit-site-link-768x301.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2025/04/frost-edit-site-link.jpg 1200w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>These scenarios demonstrate the commons issues you might face getting started with block themes. </p>



<h2 class="wp-block-heading">How to fix these scenarios</h2>



<p>First you have to understand the WordPress template hierarchy to understand <em>why</em> this is happening. </p>



<h3 class="wp-block-heading">The WordPress template hierarchy</h3>



<p>The template hierarchy is the system that determines which template WordPress will choose to display the content, when a page is requested. </p>



<p>Usually it&#8217;s quite straightforward &#8211; a single post will use the Single template. A standard page will use the Page template etc.</p>



<p>But the <a href="https://developer.wordpress.org/themes/basics/template-hierarchy/#home-page-display" title="">homepage is a bit unique and tricky.</a> There&#8217;s potentially 3 templates that could be used:</p>



<ul class="wp-block-list">
<li><strong>front-page</strong>: this will be used regardless of if you have set your homepage as blog posts or a static page. It has the highest precedence in the hierarchy.</li>



<li><strong>home</strong>: this will be used only if you&#8217;ve set your blog posts for the homepage. If you&#8217;ve set a static page, you&#8217;ll see your page content as expected.</li>



<li><strong>index</strong>: If neither a home nor a front-page template exists, then the index template will be used, so it should show whatever content you already have.</li>
</ul>



<p>So in the scenarios I outlined, this is what happened:</p>



<ul class="wp-block-list">
<li>Beaumont comes with a front-page.html template, so the content in it always showed up on the home whether it was set to display posts or a page.</li>



<li>On the other hand, Frost does not come with a front-page.html. Instead it has a home.html template. So the demo content inside that template showed up only when my Reading settings were set to display posts on the homepage. When I set my site to a static homepage, my own content showed up.</li>



<li>If your theme uses an index template instead of front-page or home, like the <a href="https://wordpress.org/themes/ollie/" title="">Ollie theme</a> does, it will display whatever content you&#8217;ve already created.</li>
</ul>



<p>It&#8217;s a lot to expect a new WordPress user, or even someone that&#8217;s used WordPress before, to understand intuitively what&#8217;s going on here. </p>



<h4 class="wp-block-heading">How do you know which template your theme is using? </h4>



<ul class="wp-block-list">
<li>Go to <em>Appearance → Editor → Templates</em></li>



<li>Click on your theme name to filter out other templates</li>



<li>Now see what you have:<br></li>
</ul>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/03/theme-templates.jpg"><img decoding="async" width="1024" height="412" src="https://webtrainingwheels.com/wp-content/uploads/2025/03/theme-templates-1024x412.jpg" alt="" class="wp-image-6413" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/03/theme-templates-1024x412.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2025/03/theme-templates-500x201.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/03/theme-templates-768x309.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2025/03/theme-templates.jpg 1500w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>So now you know why certain content is showing on your homepage, what do you do  if you want to change that?</p>



<p>You&#8217;ll either need to edit the template that&#8217;s currently being used and/or create a new one.</p>



<p>For example, in the Beaumont scenario, if I want to show my own static page on the homepage and use the Beaumont template for the Blog page, this is what I would do: </p>



<h4 class="wp-block-heading">Copy the Front Page Template to a Blog Home Template</h4>



<ol class="wp-block-list">
<li>Go to <em>Appearance → Editor → Templates</em></li>



<li>Click on the front page template to open the Site Editor.</li>



<li>Click on List view</li>



<li>Select all blocks (click the first block, hold down the SHIFT key, then click the last block and it should highlight all of them) in List View, and either right-click or CMD+ C on a Mac (CTRL+C on a PC) to copy them to your clipboard.</li>



<li>Click the WordPress logo at the top left to get back to the Templates page. </li>



<li>Click <em>Add New Template</em></li>



<li>Select Blog Home. In some cases you&#8217;ll see a modal with a pattern or two to choose from. This will vary according to your theme. If one of the patterns presented fits your needs, by all means choose it to get started. But it&#8217;s not strictly necessary and you can skip it. </li>



<li>After this step you&#8217;ll be in the Site Editor.</li>



<li>Right-click or CMD+V (CTRL + V on a PC) to paste all the blocks, then click Save at the top right.</li>
</ol>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/04/copy-all-template-blocks.jpg"><img decoding="async" width="1024" height="427" data-id="6460" src="https://webtrainingwheels.com/wp-content/uploads/2025/04/copy-all-template-blocks-1024x427.jpg" alt="" class="wp-image-6460" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/04/copy-all-template-blocks-1024x427.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2025/04/copy-all-template-blocks-500x208.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/04/copy-all-template-blocks-768x320.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2025/04/copy-all-template-blocks.jpg 1200w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Select all the blocks and copy</figcaption></figure>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/04/new-blog-home-template.jpg"><img decoding="async" width="1024" height="643" data-id="6459" src="https://webtrainingwheels.com/wp-content/uploads/2025/04/new-blog-home-template-1024x643.jpg" alt="" class="wp-image-6459" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/04/new-blog-home-template-1024x643.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2025/04/new-blog-home-template-500x314.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/04/new-blog-home-template-768x483.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2025/04/new-blog-home-template.jpg 1200w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Create new Blog Home template</figcaption></figure>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/04/template-starter-patterns-modal.jpg"><img decoding="async" width="1000" height="563" data-id="6458" src="https://webtrainingwheels.com/wp-content/uploads/2025/04/template-starter-patterns-modal.jpg" alt="" class="wp-image-6458" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/04/template-starter-patterns-modal.jpg 1000w, https://webtrainingwheels.com/wp-content/uploads/2025/04/template-starter-patterns-modal-500x282.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/04/template-starter-patterns-modal-768x432.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></a><figcaption class="wp-element-caption">starter pattern modal for templates</figcaption></figure>
</figure>



<p>Now your blog page has the Beaumont layout for posts, and we can re-purpose the front-page template to show our static page content.</p>



<h4 class="wp-block-heading">Edit the Front Page Template to Show Page Content</h4>



<ol class="wp-block-list">
<li>Go to the site editor and click on the front page template again.</li>



<li>Now you&#8217;re going to delete the blocks you don&#8217;t want. When you delete a block containing a Query Loop, you will see a warning message. But you can ignore it and proceed with deletion because in the next step we&#8217;re going to add a block that displays your content.</li>



<li>In the Block Inserter, scroll down until you see the <em>theme</em> section. Choose the Content block which will show your static page content.</li>
</ol>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-2 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-full"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/03/edit-front-page-template.jpg"><img decoding="async" width="1000" height="515" data-id="6436" src="https://webtrainingwheels.com/wp-content/uploads/2025/03/edit-front-page-template.jpg" alt="" class="wp-image-6436" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/03/edit-front-page-template.jpg 1000w, https://webtrainingwheels.com/wp-content/uploads/2025/03/edit-front-page-template-500x258.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/03/edit-front-page-template-768x396.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></a></figure>



<figure class="wp-block-image size-full"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/03/delete-query-loop-warning.jpg"><img decoding="async" width="1024" height="426" data-id="6434" src="https://webtrainingwheels.com/wp-content/uploads/2025/03/delete-query-loop-warning.jpg" alt="" class="wp-image-6434" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/03/delete-query-loop-warning.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2025/03/delete-query-loop-warning-500x208.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/03/delete-query-loop-warning-768x320.jpg 768w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<figure class="wp-block-image size-full"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/03/theme-blocks-content.jpg"><img decoding="async" width="800" height="570" data-id="6435" src="https://webtrainingwheels.com/wp-content/uploads/2025/03/theme-blocks-content.jpg" alt="" class="wp-image-6435" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/03/theme-blocks-content.jpg 800w, https://webtrainingwheels.com/wp-content/uploads/2025/03/theme-blocks-content-500x356.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/03/theme-blocks-content-768x547.jpg 768w" sizes="(max-width: 800px) 100vw, 800px" /></a></figure>
</figure>



<p></p>



<p>If you&#8217;re like me, you might be concerned about editing the template directly and not being able to revert back to its former state. But, don&#8217;t worry, you can always revert back to the theme&#8217;s default content by using the <em>Reset</em> option:</p>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/04/reset-template.jpg"><img decoding="async" width="900" height="781" src="https://webtrainingwheels.com/wp-content/uploads/2025/04/reset-template.jpg" alt="" class="wp-image-6481" style="width:553px;height:auto" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/04/reset-template.jpg 900w, https://webtrainingwheels.com/wp-content/uploads/2025/04/reset-template-500x434.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/04/reset-template-768x666.jpg 768w" sizes="(max-width: 900px) 100vw, 900px" /></a></figure></div>


<p></p>



<h4 class="wp-block-heading">How to use your theme&#8217;s demo content, in the right way</h4>



<p>In the case of a theme like Frost or Spectra, you might want to use their demo content as a starting point for your homepage, but you need to get that into the page editor instead of editing the template itself.</p>



<p>There are 2 ways to do this:</p>



<p>1. <strong>Copy template blocks to your page</strong></p>



<p>The premise of the full site editor is that blocks are usable across pages and templates, anywhere you&#8217;d edit your site basically. That means you can copy/paste blocks from a template to a page to duplicate the design.</p>



<ul class="wp-block-list">
<li>Open the Blog home page template in the site editor</li>



<li>Open the List View. Select and copy all the blocks.
<ul class="wp-block-list">
<li>Tip: don&#8217;t copy header and footer template blocks, just the content sections. </li>
</ul>
</li>



<li>Exit the site editor and go to <em>Pages  → New</em></li>



<li>In the editor, paste the blocks</li>
</ul>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/04/select-content-blocks.jpg"><img decoding="async" width="1024" height="414" src="https://webtrainingwheels.com/wp-content/uploads/2025/04/select-content-blocks-1024x414.jpg" alt="" class="wp-image-6465" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/04/select-content-blocks-1024x414.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2025/04/select-content-blocks-500x202.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/04/select-content-blocks-768x310.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2025/04/select-content-blocks.jpg 1200w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Copy content blocks from Template, for pasting into a page</figcaption></figure>



<p>2. <strong>Recreate the template using patterns</strong></p>



<p>The template design should be comprised of patterns, which would be available in the pattern inserter when editing a page. </p>



<ol class="wp-block-list">
<li>Create a new page</li>



<li>Click the Block Inserter and click on Patterns</li>



<li>Look for the patterns that match the sections you want to add from the demo
<ul class="wp-block-list">
<li>This works but can be a bit laborious because it&#8217;s not always easy to find each specific pattern.</li>



<li>Some themes, like Frost, do make it easier by making full page layouts available as patterns. You&#8217;ll see them by clicking on <em>Patterns → Page</em><br></li>
</ul>
</li>
</ol>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/04/frost-page-patterns.jpg"><img decoding="async" width="1306" height="1826" src="https://webtrainingwheels.com/wp-content/uploads/2025/04/frost-page-patterns.jpg" alt="" class="wp-image-6467" style="width:438px;height:auto" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/04/frost-page-patterns.jpg 1306w, https://webtrainingwheels.com/wp-content/uploads/2025/04/frost-page-patterns-358x500.jpg 358w, https://webtrainingwheels.com/wp-content/uploads/2025/04/frost-page-patterns-732x1024.jpg 732w, https://webtrainingwheels.com/wp-content/uploads/2025/04/frost-page-patterns-768x1074.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2025/04/frost-page-patterns-1099x1536.jpg 1099w" sizes="(max-width: 1306px) 100vw, 1306px" /></a></figure></div>


<p></p>



<p>Hopefully WordPress improves the onboarding experience for block themes in the future, providing an easier path forward which doesn&#8217;t require so much insider knowledge!</p><div id="webtr-1374583722" class="webtr-content"><script>
var gform;gform||(document.addEventListener("gform_main_scripts_loaded",function(){gform.scriptsLoaded=!0}),document.addEventListener("gform/theme/scripts_loaded",function(){gform.themeScriptsLoaded=!0}),window.addEventListener("DOMContentLoaded",function(){gform.domLoaded=!0}),gform={domLoaded:!1,scriptsLoaded:!1,themeScriptsLoaded:!1,isFormEditor:()=>"function"==typeof InitializeEditor,callIfLoaded:function(o){return!(!gform.domLoaded||!gform.scriptsLoaded||!gform.themeScriptsLoaded&&!gform.isFormEditor()||(gform.isFormEditor()&&console.warn("The use of gform.initializeOnLoaded() is deprecated in the form editor context and will be removed in Gravity Forms 3.1."),o(),0))},initializeOnLoaded:function(o){gform.callIfLoaded(o)||(document.addEventListener("gform_main_scripts_loaded",()=>{gform.scriptsLoaded=!0,gform.callIfLoaded(o)}),document.addEventListener("gform/theme/scripts_loaded",()=>{gform.themeScriptsLoaded=!0,gform.callIfLoaded(o)}),window.addEventListener("DOMContentLoaded",()=>{gform.domLoaded=!0,gform.callIfLoaded(o)}))},hooks:{action:{},filter:{}},addAction:function(o,r,e,t){gform.addHook("action",o,r,e,t)},addFilter:function(o,r,e,t){gform.addHook("filter",o,r,e,t)},doAction:function(o){gform.doHook("action",o,arguments)},applyFilters:function(o){return gform.doHook("filter",o,arguments)},removeAction:function(o,r){gform.removeHook("action",o,r)},removeFilter:function(o,r,e){gform.removeHook("filter",o,r,e)},addHook:function(o,r,e,t,n){null==gform.hooks[o][r]&&(gform.hooks[o][r]=[]);var d=gform.hooks[o][r];null==n&&(n=r+"_"+d.length),gform.hooks[o][r].push({tag:n,callable:e,priority:t=null==t?10:t})},doHook:function(r,o,e){var t;if(e=Array.prototype.slice.call(e,1),null!=gform.hooks[r][o]&&((o=gform.hooks[r][o]).sort(function(o,r){return o.priority-r.priority}),o.forEach(function(o){"function"!=typeof(t=o.callable)&&(t=window[t]),"action"==r?t.apply(null,e):e[0]=t.apply(null,e)})),"filter"==r)return e[0]},removeHook:function(o,r,t,n){var e;null!=gform.hooks[o][r]&&(e=(e=gform.hooks[o][r]).filter(function(o,r,e){return!!(null!=n&&n!=o.tag||null!=t&&t!=o.priority)}),gform.hooks[o][r]=e)}});
</script>

                <div class='gf_browser_unknown gform_wrapper gform_legacy_markup_wrapper gform-theme--no-framework' data-form-theme='legacy' data-form-index='0' id='gform_wrapper_32' >
                        <div class='gform_heading'>
                            <h3 class="gform_title">Weekly WordPress Tips To Your Inbox</h3>
                        </div><form method='post' enctype='multipart/form-data'  id='gform_32'  action='/feed/' data-formid='32' novalidate> 
 <input type='hidden' class='gforms-pum' value='{"closepopup":false,"closedelay":0,"openpopup":false,"openpopup_id":0}' />
                        <div class='gform-body gform_body'><ul id='gform_fields_32' class='gform_fields top_label form_sublabel_below description_below validation_below'><li id="field_32_3" class="gfield gfield--type-honeypot gform_validation_container field_sublabel_below gfield--has-description field_description_below field_validation_below gfield_visibility_visible"  ><label class='gfield_label gform-field-label' for='input_32_3'>Instagram</label><div class='ginput_container'><input name='input_3' id='input_32_3' type='text' value='' autocomplete='new-password'/></div><div class='gfield_description' id='gfield_description_32_3'>This field is for validation purposes and should be left unchanged.</div></li><li id="field_32_1" class="gfield gfield--type-email gfield_contains_required field_sublabel_below gfield--no-description field_description_below field_validation_below gfield_visibility_visible"  ><label class='gfield_label gform-field-label screen-reader-text' for='input_32_1'>Enter Your Email, It&#039;s Free!<span class="gfield_required"><span class="gfield_required gfield_required_asterisk">*</span></span></label><div class='ginput_container ginput_container_email'>
                            <input name='input_1' id='input_32_1' type='email' value='' class='large'   placeholder='Enter Your Email, It&#039;s Free!' aria-required="true" aria-invalid="false"  />
                        </div></li><li id="field_32_2" class="gfield gfield--type-hidden gform_hidden field_sublabel_below gfield--no-description field_description_below field_validation_below gfield_visibility_visible"  ><div class='ginput_container ginput_container_text'><input name='input_2' id='input_32_2' type='hidden' class='gform_hidden'  aria-invalid="false" value='http://webtrainingwheels.com/feed/' /></div></li></ul></div>
        <div class='gform-footer gform_footer top_label'> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body><div class="gf-turnstile-container"> <div id="cf-turnstile-gf-32" class="cf-turnstile" data-callback="turnstileGravityCallback" data-sitekey="0x4AAAAAAA7A0N4QhHj7cf1O" data-theme="light" data-language="auto" data-size="normal" data-retry="auto" data-retry-interval="1000" data-refresh-expired="auto" data-action="gravity-form-32" data-appearance="always"></div> <style>.gform_button { pointer-events: none; opacity: 0.5; }</style> <script>document.addEventListener("DOMContentLoaded", function() { setTimeout(function(){ var e=document.getElementById("cf-turnstile-gf-32"); e&&!e.innerHTML.trim()&&(turnstile.remove("#cf-turnstile-gf-32"), turnstile.render("#cf-turnstile-gf-32", {sitekey:"0x4AAAAAAA7A0N4QhHj7cf1O"})); }, 100); });</script> <br class="cf-turnstile-br cf-turnstile-br-gf-32"> <style>#cf-turnstile-gf-32 { margin-left: -15px; }</style> </div> <style> .gf-turnstile-container { width: 100%; } .gform_footer.top_label { display: flex; flex-wrap: wrap; } </style> <script>document.addEventListener("DOMContentLoaded", function() {document.addEventListener('gform/post_render', function handlePostRender(event) {if (event.detail.formId !== 32) {return;}gform.utils.addAsyncFilter('gform/submission/pre_submission', async function handlePreSubmission(data) {document.addEventListener('gform/post_render', function rerenderTurnstile(event) {if (event.detail.formId !== 32) {return;}const turnstileElement = document.getElementById('cf-turnstile-gf-32');if (turnstileElement) {turnstile.remove('#cf-turnstile-gf-32');turnstile.render('#cf-turnstile-gf-32');}document.removeEventListener('gform/post_render', rerenderTurnstile);});gform.utils.removeFilter('gform/submission/pre_submission', handlePreSubmission);return data;});document.removeEventListener('gform/post_render', handlePostRender);});});</script><input type="submit" id="gform_submit_button_32" class="gform_button button" onclick="__gaTracker('send', 'event', { eventCategory: 'Forms', eventAction: 'Subscribe', eventLabel: 'PostFooter'});gform.submission.handleButtonClick(this);" data-submission-type="submit" value="Sign Up"></body></html>
 
            <input type='hidden' class='gform_hidden' name='gform_submission_method' data-js='gform_submission_method_32' value='postback' />
            <input type='hidden' class='gform_hidden' name='gform_theme' data-js='gform_theme_32' id='gform_theme_32' value='legacy' />
            <input type='hidden' class='gform_hidden' name='gform_style_settings' data-js='gform_style_settings_32' id='gform_style_settings_32' value='[]' />
            <input type='hidden' class='gform_hidden' name='is_submit_32' value='1' />
            <input type='hidden' class='gform_hidden' name='gform_submit' value='32' />
            
            <input type='hidden' class='gform_hidden' name='gform_currency' data-currency='USD' value='bzVrutE56e1dZRAnpDKX76ZPUZlDZ/ILdXBfEm1AYdzklIAOOUp4PGCIEl9/+Vdkx8RizzJeBgGb6Mp0dxm7LOyKTp/4UIzhYbKm0BOkJIsQ1w8=' />
            <input type='hidden' class='gform_hidden' name='gform_unique_id' value='' />
            <input type='hidden' class='gform_hidden' name='state_32' value='WyJbXSIsIjNhZjRhZTc2ODU5NzRiOTg2YjVjODkwMzk3M2ZhNTE5Il0=' />
            <input type='hidden' autocomplete='off' class='gform_hidden' name='gform_target_page_number_32' id='gform_target_page_number_32' value='0' />
            <input type='hidden' autocomplete='off' class='gform_hidden' name='gform_source_page_number_32' id='gform_source_page_number_32' value='1' />
            <input type='hidden' name='gform_field_values' value='' />
            
        </div>
                        </form>
                        </div><script>
gform.initializeOnLoaded( function() {gformInitSpinner( 32, 'http://webtrainingwheels.com/wp-content/plugins/gravityforms/images/spinner.svg', true );jQuery('#gform_ajax_frame_32').on('load',function(){var contents = jQuery(this).contents().find('*').html();var is_postback = contents.indexOf('GF_AJAX_POSTBACK') >= 0;if(!is_postback){return;}var form_content = jQuery(this).contents().find('#gform_wrapper_32');var is_confirmation = jQuery(this).contents().find('#gform_confirmation_wrapper_32').length > 0;var is_redirect = contents.indexOf('gformRedirect(){') >= 0;var is_form = form_content.length > 0 && ! is_redirect && ! is_confirmation;var mt = parseInt(jQuery('html').css('margin-top'), 10) + parseInt(jQuery('body').css('margin-top'), 10) + 100;if(is_form){jQuery('#gform_wrapper_32').html(form_content.html());if(form_content.hasClass('gform_validation_error')){jQuery('#gform_wrapper_32').addClass('gform_validation_error');} else {jQuery('#gform_wrapper_32').removeClass('gform_validation_error');}setTimeout( function() { /* delay the scroll by 50 milliseconds to fix a bug in chrome */  }, 50 );if(window['gformInitDatepicker']) {gformInitDatepicker();}if(window['gformInitPriceFields']) {gformInitPriceFields();}var current_page = jQuery('#gform_source_page_number_32').val();gformInitSpinner( 32, 'http://webtrainingwheels.com/wp-content/plugins/gravityforms/images/spinner.svg', true );jQuery(document).trigger('gform_page_loaded', [32, current_page]);window['gf_submitting_32'] = false;}else if(!is_redirect){var confirmation_content = jQuery(this).contents().find('.GF_AJAX_POSTBACK').html();if(!confirmation_content){confirmation_content = contents;}jQuery('#gform_wrapper_32').replaceWith(confirmation_content);jQuery(document).trigger('gform_confirmation_loaded', [32]);window['gf_submitting_32'] = false;wp.a11y.speak(jQuery('#gform_confirmation_message_32').text());}else{jQuery('#gform_32').append(contents);if(window['gformRedirect']) {gformRedirect();}}jQuery(document).trigger("gform_pre_post_render", [{ formId: "32", currentPage: "current_page", abort: function() { this.preventDefault(); } }]);        if (event && event.defaultPrevented) {                return;        }        const gformWrapperDiv = document.getElementById( "gform_wrapper_32" );        if ( gformWrapperDiv ) {            const visibilitySpan = document.createElement( "span" );            visibilitySpan.id = "gform_visibility_test_32";            gformWrapperDiv.insertAdjacentElement( "afterend", visibilitySpan );        }        const visibilityTestDiv = document.getElementById( "gform_visibility_test_32" );        let postRenderFired = false;        function triggerPostRender() {            if ( postRenderFired ) {                return;            }            postRenderFired = true;            gform.core.triggerPostRenderEvents( 32, current_page );            if ( visibilityTestDiv ) {                visibilityTestDiv.parentNode.removeChild( visibilityTestDiv );            }        }        function debounce( func, wait, immediate ) {            var timeout;            return function() {                var context = this, args = arguments;                var later = function() {                    timeout = null;                    if ( !immediate ) func.apply( context, args );                };                var callNow = immediate && !timeout;                clearTimeout( timeout );                timeout = setTimeout( later, wait );                if ( callNow ) func.apply( context, args );            };        }        const debouncedTriggerPostRender = debounce( function() {            triggerPostRender();        }, 200 );        if ( visibilityTestDiv && visibilityTestDiv.offsetParent === null ) {            const observer = new MutationObserver( ( mutations ) => {                mutations.forEach( ( mutation ) => {                    if ( mutation.type === 'attributes' && visibilityTestDiv.offsetParent !== null ) {                        debouncedTriggerPostRender();                        observer.disconnect();                    }                });            });            observer.observe( document.body, {                attributes: true,                childList: false,                subtree: true,                attributeFilter: [ 'style', 'class' ],            });        } else {            triggerPostRender();        }    } );} );
</script>
</div>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>What is Full Site Editing in WordPress?</title>
		<link>https://webtrainingwheels.com/full-site-editing-in-wordpress/</link>
		
		<dc:creator><![CDATA[Lucy]]></dc:creator>
		<pubDate>Mon, 17 Feb 2025 01:26:47 +0000</pubDate>
				<category><![CDATA[WordPress Tutorials - Basic]]></category>
		<category><![CDATA[full site editing]]></category>
		<guid isPermaLink="false">http://webtrainingwheels.com/?p=6158</guid>

					<description><![CDATA[Full site editing is the new direction that WordPress is heading in, to provide a better editing and design experience for site owners. To get familiar with the new terminology that comes along with Full Site Editing, please read the glossary. You have likely already used the block editor, formerly known as Gutenberg. It&#8217;s been ... <p class="read-more-container"><a title="What is Full Site Editing in WordPress?" class="read-more button" href="https://webtrainingwheels.com/full-site-editing-in-wordpress/#more-6158" aria-label="Read more about What is Full Site Editing in WordPress?">Read more</a></p>]]></description>
										<content:encoded><![CDATA[<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" width="740" height="400" src="https://webtrainingwheels.com/wp-content/uploads/2025/02/full-site-editing-feat-740x400-1.jpg" alt="" class="wp-image-6324" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/02/full-site-editing-feat-740x400-1.jpg 740w, https://webtrainingwheels.com/wp-content/uploads/2025/02/full-site-editing-feat-740x400-1-500x270.jpg 500w" sizes="(max-width: 740px) 100vw, 740px" /></figure></div>


<p>Full site editing is the new direction that WordPress is heading in, to provide a better editing and design experience for site owners.</p>



<p>To get familiar with the new terminology that comes along with <a href="https://webtrainingwheels.com/wordpress-full-site-editing-glossary/" title="WordPress Full Site Editing Glossary">Full Site Editing, please read the glossary.</a></p>



<p>You have likely already used the block editor, formerly known as Gutenberg. It&#8217;s been the default editor since WordPress 5.0.</p>



<span id="more-6158"></span>



<p>The block editor looks like this: </p>



<p></p>



<figure class="wp-block-image size-full"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-editor.jpg"><img decoding="async" width="1000" height="513" src="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-editor.jpg" alt="" class="wp-image-6159" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-editor.jpg 1000w, https://webtrainingwheels.com/wp-content/uploads/2025/01/block-editor-500x257.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/01/block-editor-768x394.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></a></figure>



<p>The previous editing experience, now known as &#8220;classic editor&#8221; looked like this: </p>



<figure class="wp-block-image size-full"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/01/classic-editor.jpg"><img decoding="async" width="1000" height="559" src="https://webtrainingwheels.com/wp-content/uploads/2025/01/classic-editor.jpg" alt="" class="wp-image-6160" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/01/classic-editor.jpg 1000w, https://webtrainingwheels.com/wp-content/uploads/2025/01/classic-editor-500x280.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/01/classic-editor-768x429.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></a></figure>



<p></p>



<p>With Full Site Editing, this block concept and interface is expanded beyond the page and post editor, to all parts of your site. This will allow site owners to more easily design and edit their site, using core WordPress features. </p>



<p>The Site Editor extends the block concept to other areas of your site:</p>



<ul class="wp-block-list">
<li>header</li>



<li>footer</li>



<li>navigation</li>



<li>template files</li>
</ul>



<p>For example, this is how you can now edit your navigation menu:</p>



<figure class="wp-block-image size-full"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/01/navigation-block.jpg"><img decoding="async" width="1000" height="365" src="https://webtrainingwheels.com/wp-content/uploads/2025/01/navigation-block.jpg" alt="" class="wp-image-6162" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/01/navigation-block.jpg 1000w, https://webtrainingwheels.com/wp-content/uploads/2025/01/navigation-block-500x183.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/01/navigation-block-768x280.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></a></figure>



<p></p>



<h2 class="wp-block-heading">Why is full site editing a good thing for WordPress site owners?</h2>



<p>Previously, site owners were very dependent on the controls provided by the theme they selected.</p>



<p>For example, if you wanted to edit and customize the header section of your site, your theme had to provide options for that, otherwise you would need to get into the code.</p>



<p>One issue with this is that, not only were you dependent on your theme, but the experience of editing would also vary based on your theme. Some themes utilized the customizer, but some still had their own proprietary options panel.</p>



<p>With the Full Site Editing concept, the role of themes will be different, and editing your site will be a much more consistent experience no mater which theme you use.</p>



<h2 class="wp-block-heading">What&#8217;s the difference between full site editing and the block editor or Gutenberg?</h2>



<p>The block editor was the first dip of the toe into this concept. But it&#8217;s just a replacement for the editing experience of an individual post or page. Full site editing is an expansion of the block editing experience.</p>



<h2 class="wp-block-heading">How do I start using full site editing?</h2>



<p>To make use of full site editing, you must use what&#8217;s called a block theme which enables these controls. </p>



<p>A few examples of free block themes are:</p>



<ul class="wp-block-list">
<li><a href="https://wordpress.org/themes/twentytwentyfive/" target="_blank" rel="noopener" title="">TwentyTwenty Five</a></li>



<li><a href="https://wordpress.org/themes/frost/" target="_blank" rel="noopener" title="">Frost</a></li>



<li><a href="https://wordpress.org/themes/ollie/" target="_blank" rel="noopener" title="">Ollie</a> </li>
</ul>



<p></p>



<h2 class="wp-block-heading">How do I know if my site has full site editing?</h2>



<p>Look for these indications:</p>



<ol class="wp-block-list">
<li>In the Appearance menu, you will have the option <em>Editor</em></li>



<li>When viewing your site, while logged in, you will have the <em>Edit site</em> option</li>
</ol>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-3 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/01/edit-site.jpg"><img decoding="async" width="726" height="90" data-id="6167" src="https://webtrainingwheels.com/wp-content/uploads/2025/01/edit-site.jpg" alt="" class="wp-image-6167" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/01/edit-site.jpg 726w, https://webtrainingwheels.com/wp-content/uploads/2025/01/edit-site-500x62.jpg 500w" sizes="(max-width: 726px) 100vw, 726px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/01/appearance-editor-1.jpg"><img decoding="async" width="680" height="304" data-id="6166" src="https://webtrainingwheels.com/wp-content/uploads/2025/01/appearance-editor-1.jpg" alt="" class="wp-image-6166" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/01/appearance-editor-1.jpg 680w, https://webtrainingwheels.com/wp-content/uploads/2025/01/appearance-editor-1-500x224.jpg 500w" sizes="(max-width: 680px) 100vw, 680px" /></a></figure>
</figure>



<h2 class="wp-block-heading">Can I enable full site editing on a regular theme?</h2>



<p>Sort of, but to a limited extent.</p>



<p>If you are a developer you can technically add many components of FSE to a classic theme. But not all components will be available, so what you would end up with would be hybrid between a classic and an FSE, or block, theme.</p>



<p>But this is a highly technical process and may or may not be worth the effort.</p>



<p>Read more about that process at the excellent <a href="https://fullsiteediting.com/lessons/adding-full-site-editing-features-to-classic-themes/" target="_blank" rel="noopener" title="">FullSiteEditing.com</a></p>



<p>If you are not a developer, it would be better to either keep using your current theme, or switch to a different, already FSE-enabled theme.</p>



<p>There is no requirement to do this, however. Your theme will keep working, so there&#8217;s no specific need to start using FSE on your current site.</p>



<p><strong>Keep reading: <a href="https://webtrainingwheels.com/difference-between-wordpress-fse-themes-classic-themes/" title="The Difference Between WordPress FSE Themes and Classic Themes">What&#8217;s the difference between a full site editing theme and a classic theme?</a></strong></p><div id="webtr-684279103" class="webtr-content">
                <div class='gf_browser_unknown gform_wrapper gform_legacy_markup_wrapper gform-theme--no-framework' data-form-theme='legacy' data-form-index='0' id='gform_wrapper_32' >
                        <div class='gform_heading'>
                            <h3 class="gform_title">Weekly WordPress Tips To Your Inbox</h3>
                        </div><form method='post' enctype='multipart/form-data'  id='gform_32'  action='/feed/' data-formid='32' novalidate> 
 <input type='hidden' class='gforms-pum' value='{"closepopup":false,"closedelay":0,"openpopup":false,"openpopup_id":0}' />
                        <div class='gform-body gform_body'><ul id='gform_fields_32' class='gform_fields top_label form_sublabel_below description_below validation_below'><li id="field_32_3" class="gfield gfield--type-honeypot gform_validation_container field_sublabel_below gfield--has-description field_description_below field_validation_below gfield_visibility_visible"  ><label class='gfield_label gform-field-label' for='input_32_3'>Phone</label><div class='ginput_container'><input name='input_3' id='input_32_3' type='text' value='' autocomplete='new-password'/></div><div class='gfield_description' id='gfield_description_32_3'>This field is for validation purposes and should be left unchanged.</div></li><li id="field_32_1" class="gfield gfield--type-email gfield_contains_required field_sublabel_below gfield--no-description field_description_below field_validation_below gfield_visibility_visible"  ><label class='gfield_label gform-field-label screen-reader-text' for='input_32_1'>Enter Your Email, It&#039;s Free!<span class="gfield_required"><span class="gfield_required gfield_required_asterisk">*</span></span></label><div class='ginput_container ginput_container_email'>
                            <input name='input_1' id='input_32_1' type='email' value='' class='large'   placeholder='Enter Your Email, It&#039;s Free!' aria-required="true" aria-invalid="false"  />
                        </div></li><li id="field_32_2" class="gfield gfield--type-hidden gform_hidden field_sublabel_below gfield--no-description field_description_below field_validation_below gfield_visibility_visible"  ><div class='ginput_container ginput_container_text'><input name='input_2' id='input_32_2' type='hidden' class='gform_hidden'  aria-invalid="false" value='http://webtrainingwheels.com/feed/' /></div></li></ul></div>
        <div class='gform-footer gform_footer top_label'> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body><div class="gf-turnstile-container"> <div id="cf-turnstile-gf-32" class="cf-turnstile" data-callback="turnstileGravityCallback" data-sitekey="0x4AAAAAAA7A0N4QhHj7cf1O" data-theme="light" data-language="auto" data-size="normal" data-retry="auto" data-retry-interval="1000" data-refresh-expired="auto" data-action="gravity-form-32" data-appearance="always"></div> <style>.gform_button { pointer-events: none; opacity: 0.5; }</style> <script>document.addEventListener("DOMContentLoaded", function() { setTimeout(function(){ var e=document.getElementById("cf-turnstile-gf-32"); e&&!e.innerHTML.trim()&&(turnstile.remove("#cf-turnstile-gf-32"), turnstile.render("#cf-turnstile-gf-32", {sitekey:"0x4AAAAAAA7A0N4QhHj7cf1O"})); }, 100); });</script> <br class="cf-turnstile-br cf-turnstile-br-gf-32"> <style>#cf-turnstile-gf-32 { margin-left: -15px; }</style> </div> <style> .gf-turnstile-container { width: 100%; } .gform_footer.top_label { display: flex; flex-wrap: wrap; } </style> <script>document.addEventListener("DOMContentLoaded", function() {document.addEventListener('gform/post_render', function handlePostRender(event) {if (event.detail.formId !== 32) {return;}gform.utils.addAsyncFilter('gform/submission/pre_submission', async function handlePreSubmission(data) {document.addEventListener('gform/post_render', function rerenderTurnstile(event) {if (event.detail.formId !== 32) {return;}const turnstileElement = document.getElementById('cf-turnstile-gf-32');if (turnstileElement) {turnstile.remove('#cf-turnstile-gf-32');turnstile.render('#cf-turnstile-gf-32');}document.removeEventListener('gform/post_render', rerenderTurnstile);});gform.utils.removeFilter('gform/submission/pre_submission', handlePreSubmission);return data;});document.removeEventListener('gform/post_render', handlePostRender);});});</script><input type="submit" id="gform_submit_button_32" class="gform_button button" onclick="__gaTracker('send', 'event', { eventCategory: 'Forms', eventAction: 'Subscribe', eventLabel: 'PostFooter'});gform.submission.handleButtonClick(this);" data-submission-type="submit" value="Sign Up"></body></html>
 
            <input type='hidden' class='gform_hidden' name='gform_submission_method' data-js='gform_submission_method_32' value='postback' />
            <input type='hidden' class='gform_hidden' name='gform_theme' data-js='gform_theme_32' id='gform_theme_32' value='legacy' />
            <input type='hidden' class='gform_hidden' name='gform_style_settings' data-js='gform_style_settings_32' id='gform_style_settings_32' value='[]' />
            <input type='hidden' class='gform_hidden' name='is_submit_32' value='1' />
            <input type='hidden' class='gform_hidden' name='gform_submit' value='32' />
            
            <input type='hidden' class='gform_hidden' name='gform_currency' data-currency='USD' value='FcxaD86i5R16nl65ZVPEh3bufR49EbSv9mXRA4wtcD6xQjmylmgqTm+vGAaIMrTEQ7mUhGmP11KDyM+g2muFPQHfh6eXxG+56uwGcj0pbtdDG4w=' />
            <input type='hidden' class='gform_hidden' name='gform_unique_id' value='' />
            <input type='hidden' class='gform_hidden' name='state_32' value='WyJbXSIsIjNhZjRhZTc2ODU5NzRiOTg2YjVjODkwMzk3M2ZhNTE5Il0=' />
            <input type='hidden' autocomplete='off' class='gform_hidden' name='gform_target_page_number_32' id='gform_target_page_number_32' value='0' />
            <input type='hidden' autocomplete='off' class='gform_hidden' name='gform_source_page_number_32' id='gform_source_page_number_32' value='1' />
            <input type='hidden' name='gform_field_values' value='' />
            
        </div>
                        </form>
                        </div><script>
gform.initializeOnLoaded( function() {gformInitSpinner( 32, 'http://webtrainingwheels.com/wp-content/plugins/gravityforms/images/spinner.svg', true );jQuery('#gform_ajax_frame_32').on('load',function(){var contents = jQuery(this).contents().find('*').html();var is_postback = contents.indexOf('GF_AJAX_POSTBACK') >= 0;if(!is_postback){return;}var form_content = jQuery(this).contents().find('#gform_wrapper_32');var is_confirmation = jQuery(this).contents().find('#gform_confirmation_wrapper_32').length > 0;var is_redirect = contents.indexOf('gformRedirect(){') >= 0;var is_form = form_content.length > 0 && ! is_redirect && ! is_confirmation;var mt = parseInt(jQuery('html').css('margin-top'), 10) + parseInt(jQuery('body').css('margin-top'), 10) + 100;if(is_form){jQuery('#gform_wrapper_32').html(form_content.html());if(form_content.hasClass('gform_validation_error')){jQuery('#gform_wrapper_32').addClass('gform_validation_error');} else {jQuery('#gform_wrapper_32').removeClass('gform_validation_error');}setTimeout( function() { /* delay the scroll by 50 milliseconds to fix a bug in chrome */  }, 50 );if(window['gformInitDatepicker']) {gformInitDatepicker();}if(window['gformInitPriceFields']) {gformInitPriceFields();}var current_page = jQuery('#gform_source_page_number_32').val();gformInitSpinner( 32, 'http://webtrainingwheels.com/wp-content/plugins/gravityforms/images/spinner.svg', true );jQuery(document).trigger('gform_page_loaded', [32, current_page]);window['gf_submitting_32'] = false;}else if(!is_redirect){var confirmation_content = jQuery(this).contents().find('.GF_AJAX_POSTBACK').html();if(!confirmation_content){confirmation_content = contents;}jQuery('#gform_wrapper_32').replaceWith(confirmation_content);jQuery(document).trigger('gform_confirmation_loaded', [32]);window['gf_submitting_32'] = false;wp.a11y.speak(jQuery('#gform_confirmation_message_32').text());}else{jQuery('#gform_32').append(contents);if(window['gformRedirect']) {gformRedirect();}}jQuery(document).trigger("gform_pre_post_render", [{ formId: "32", currentPage: "current_page", abort: function() { this.preventDefault(); } }]);        if (event && event.defaultPrevented) {                return;        }        const gformWrapperDiv = document.getElementById( "gform_wrapper_32" );        if ( gformWrapperDiv ) {            const visibilitySpan = document.createElement( "span" );            visibilitySpan.id = "gform_visibility_test_32";            gformWrapperDiv.insertAdjacentElement( "afterend", visibilitySpan );        }        const visibilityTestDiv = document.getElementById( "gform_visibility_test_32" );        let postRenderFired = false;        function triggerPostRender() {            if ( postRenderFired ) {                return;            }            postRenderFired = true;            gform.core.triggerPostRenderEvents( 32, current_page );            if ( visibilityTestDiv ) {                visibilityTestDiv.parentNode.removeChild( visibilityTestDiv );            }        }        function debounce( func, wait, immediate ) {            var timeout;            return function() {                var context = this, args = arguments;                var later = function() {                    timeout = null;                    if ( !immediate ) func.apply( context, args );                };                var callNow = immediate && !timeout;                clearTimeout( timeout );                timeout = setTimeout( later, wait );                if ( callNow ) func.apply( context, args );            };        }        const debouncedTriggerPostRender = debounce( function() {            triggerPostRender();        }, 200 );        if ( visibilityTestDiv && visibilityTestDiv.offsetParent === null ) {            const observer = new MutationObserver( ( mutations ) => {                mutations.forEach( ( mutation ) => {                    if ( mutation.type === 'attributes' && visibilityTestDiv.offsetParent !== null ) {                        debouncedTriggerPostRender();                        observer.disconnect();                    }                });            });            observer.observe( document.body, {                attributes: true,                childList: false,                subtree: true,                attributeFilter: [ 'style', 'class' ],            });        } else {            triggerPostRender();        }    } );} );
</script>
</div>



<p></p>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>WordPress Full Site Editing Glossary</title>
		<link>https://webtrainingwheels.com/wordpress-full-site-editing-glossary/</link>
		
		<dc:creator><![CDATA[Lucy]]></dc:creator>
		<pubDate>Mon, 17 Feb 2025 01:26:36 +0000</pubDate>
				<category><![CDATA[WordPress Tutorials - Basic]]></category>
		<category><![CDATA[full site editing]]></category>
		<guid isPermaLink="false">https://webtrainingwheels.com/?p=6256</guid>

					<description><![CDATA[The changes to WordPress are not only in the user experience and interface, but in the terminology as well. This glossary should help with the learning curve when navigating the new editor, as well help you to make sense of tutorials and be able to search for help more effectively. Site Editor Instead of the ... <p class="read-more-container"><a title="WordPress Full Site Editing Glossary" class="read-more button" href="https://webtrainingwheels.com/wordpress-full-site-editing-glossary/#more-6256" aria-label="Read more about WordPress Full Site Editing Glossary">Read more</a></p>]]></description>
										<content:encoded><![CDATA[<figure class="wp-block-image size-full"><img decoding="async" width="740" height="400" src="https://webtrainingwheels.com/wp-content/uploads/2025/02/full-site-editing-feat-740x400-1.jpg" alt="" class="wp-image-6324" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/02/full-site-editing-feat-740x400-1.jpg 740w, https://webtrainingwheels.com/wp-content/uploads/2025/02/full-site-editing-feat-740x400-1-500x270.jpg 500w" sizes="(max-width: 740px) 100vw, 740px" /></figure>



<p></p>



<p>The changes to WordPress are not only in the user experience and interface, but in the terminology as well. This glossary should help with the learning curve when navigating the new editor,  as well help you to make sense of tutorials and be able to search for help more effectively.</p>



<span id="more-6256"></span>



<h2 class="wp-block-heading">Site Editor</h2>



<p>Instead of the Customizer, or a proprietary theme options panel, all your controls will be in the site editor. This is found under Appearance.</p>



<figure class="wp-block-image size-full"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-site-editor.jpg"><img decoding="async" width="1000" height="501" src="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-site-editor.jpg" alt="" class="wp-image-6188" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-site-editor.jpg 1000w, https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-site-editor-500x251.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-site-editor-768x385.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></a></figure>



<p></p>



<h2 class="wp-block-heading">Styles AKA Global Styles</h2>



<p>This is where you can control typography, fonts, layout widths, block styles and other design elements, which apply across your whole site.</p>



<figure class="wp-block-image size-full"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-styles-color-palettes.jpg"><img decoding="async" width="1000" height="518" src="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-styles-color-palettes.jpg" alt="" class="wp-image-6238" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-styles-color-palettes.jpg 1000w, https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-styles-color-palettes-500x259.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-styles-color-palettes-768x398.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></a></figure>



<p></p>



<h2 class="wp-block-heading">Templates</h2>



<p>This is the same concept as in classic themes. Templates are the design layouts for types of pages on your site, such as the homepage, the blog homepage, a single post, a category page etc</p>



<p>Now you can use the block editor to more easily manage these layouts and customize your site.</p>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-templates.jpg"><img decoding="async" width="1024" height="448" src="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-templates-1024x448.jpg" alt="" class="wp-image-6229" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-templates-1024x448.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-templates-500x219.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-templates-768x336.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-templates.jpg 1200w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<h2 class="wp-block-heading"><br>Template parts</h2>



<p>These are smaller, reusable parts within a template, which may be used across the site.</p>



<p>For example, the Header is a template part, as is the footer. It&#8217;s not a full page template, but a part of a page that you can now control in the site Editor.</p>



<p>Template Parts are a sub-section of Patterns. They are a bit different from standard patterns because template parts have an area property. That means they are assigned for use within a specific place on the site.</p>



<h2 class="wp-block-heading">Theme blocks</h2>



<p>These are core blocks which are designed for use with full site editing. Some examples are: Navigation, Query Loop, Site Logo</p>



<h2 class="wp-block-heading">Block Theme</h2>



<p>A block theme is one that is designed to take full advantage of full site editing. You&#8217;ll use the site editor instead of the customizer to manage your site.</p>



<p>A few examples of block themes are: <a href="https://wordpress.org/themes/twentytwentyfive/" title="">TwentyTwenty Five</a>, <a href="https://wordpress.org/themes/ollie/" title="">Ollie</a>, <a href="https://wordpress.org/themes/frost/" title="">Frost</a>. </p>



<h2 class="wp-block-heading">Block editor</h2>



<p>This is the name for the content editing interface in WordPress. It replaces the old &#8220;classic editor&#8221; for your posts and pages. It was previously known as Gutenberg.</p>



<h2 class="wp-block-heading">Patterns</h2>



<p>Patterns are pre-configured groups of blocks that form a particular layout or feature. You can add them to your page and then edit the content of them. They are an easy and convenient way to make your site look professionally designed.</p>



<p><a href="https://webtrainingwheels.com/wordpress-block-patterns/" title="WordPress Block Patterns Explained">Patterns can be synced, unsynced or partially synced.</a></p>



<h2 class="wp-block-heading">Block grammar / block markup</h2>



<p>Block grammar, also known as block markup is a WordPress-specific type of HTML comment which is used in block theme template files and in the block editor.</p>



<p>It looks like this :</p>


<pre class="wp-block-code"><span><code class="hljs language-xml"><span class="hljs-comment">&lt;!-- wp:template-part {"slug":"header"} /--&gt;</span>

<span class="hljs-comment">&lt;!-- wp:group {"tagName":"main","style":{"spacing":{"margin":{"top":"var:preset|spacing|60"}}},"layout":{"type":"constrained"}} --&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">main</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"wp-block-group"</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"margin-top:var(--wp--preset--spacing--60)"</span>&gt;</span>
	<span class="hljs-comment">&lt;!-- wp:pattern {"slug":"twentytwentyfive/hidden-blog-heading"} /--&gt;</span>
	<span class="hljs-comment">&lt;!-- wp:pattern {"slug":"twentytwentyfive/template-query-loop"} /--&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">main</span>&gt;</span>
<span class="hljs-comment">&lt;!-- /wp:group --&gt;</span>

<span class="hljs-comment">&lt;!-- wp:template-part {"slug":"footer"} /--&gt;</span>
</code></span></pre>


<p></p>



<h2 class="wp-block-heading">List View</h2>



<p>This is a feature of the block editor which makes it much easier to view the block structure of your page or template. </p>



<p>The List View panel on the left shows you all the blocks on the page, with a hierarchical structure. You can click on any element in the List and jump to it in the editor, making navigating the page much easier.</p>



<p>When there are grouped and nested elements, it can be hard to select the part you want in the main editing window. using the List View you can be much more precised with your selections.</p>



<p>You can also drag drop elements in the List View to move them around the page. </p>



<figure class="wp-block-image size-full"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/02/block-editor-list-view.jpg"><img decoding="async" width="1000" height="530" src="https://webtrainingwheels.com/wp-content/uploads/2025/02/block-editor-list-view.jpg" alt="" class="wp-image-6260" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/02/block-editor-list-view.jpg 1000w, https://webtrainingwheels.com/wp-content/uploads/2025/02/block-editor-list-view-500x265.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/02/block-editor-list-view-768x407.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></a></figure>



<h2 class="wp-block-heading">Theme.json</h2>



<p>This file is the engine of block themes. It contains all the settings and configuration information.</p><div id="webtr-2511313003" class="webtr-content">
                <div class='gf_browser_unknown gform_wrapper gform_legacy_markup_wrapper gform-theme--no-framework' data-form-theme='legacy' data-form-index='0' id='gform_wrapper_32' >
                        <div class='gform_heading'>
                            <h3 class="gform_title">Weekly WordPress Tips To Your Inbox</h3>
                        </div><form method='post' enctype='multipart/form-data'  id='gform_32'  action='/feed/' data-formid='32' novalidate> 
 <input type='hidden' class='gforms-pum' value='{"closepopup":false,"closedelay":0,"openpopup":false,"openpopup_id":0}' />
                        <div class='gform-body gform_body'><ul id='gform_fields_32' class='gform_fields top_label form_sublabel_below description_below validation_below'><li id="field_32_3" class="gfield gfield--type-honeypot gform_validation_container field_sublabel_below gfield--has-description field_description_below field_validation_below gfield_visibility_visible"  ><label class='gfield_label gform-field-label' for='input_32_3'>Instagram</label><div class='ginput_container'><input name='input_3' id='input_32_3' type='text' value='' autocomplete='new-password'/></div><div class='gfield_description' id='gfield_description_32_3'>This field is for validation purposes and should be left unchanged.</div></li><li id="field_32_1" class="gfield gfield--type-email gfield_contains_required field_sublabel_below gfield--no-description field_description_below field_validation_below gfield_visibility_visible"  ><label class='gfield_label gform-field-label screen-reader-text' for='input_32_1'>Enter Your Email, It&#039;s Free!<span class="gfield_required"><span class="gfield_required gfield_required_asterisk">*</span></span></label><div class='ginput_container ginput_container_email'>
                            <input name='input_1' id='input_32_1' type='email' value='' class='large'   placeholder='Enter Your Email, It&#039;s Free!' aria-required="true" aria-invalid="false"  />
                        </div></li><li id="field_32_2" class="gfield gfield--type-hidden gform_hidden field_sublabel_below gfield--no-description field_description_below field_validation_below gfield_visibility_visible"  ><div class='ginput_container ginput_container_text'><input name='input_2' id='input_32_2' type='hidden' class='gform_hidden'  aria-invalid="false" value='http://webtrainingwheels.com/feed/' /></div></li></ul></div>
        <div class='gform-footer gform_footer top_label'> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body><div class="gf-turnstile-container"> <div id="cf-turnstile-gf-32" class="cf-turnstile" data-callback="turnstileGravityCallback" data-sitekey="0x4AAAAAAA7A0N4QhHj7cf1O" data-theme="light" data-language="auto" data-size="normal" data-retry="auto" data-retry-interval="1000" data-refresh-expired="auto" data-action="gravity-form-32" data-appearance="always"></div> <style>.gform_button { pointer-events: none; opacity: 0.5; }</style> <script>document.addEventListener("DOMContentLoaded", function() { setTimeout(function(){ var e=document.getElementById("cf-turnstile-gf-32"); e&&!e.innerHTML.trim()&&(turnstile.remove("#cf-turnstile-gf-32"), turnstile.render("#cf-turnstile-gf-32", {sitekey:"0x4AAAAAAA7A0N4QhHj7cf1O"})); }, 100); });</script> <br class="cf-turnstile-br cf-turnstile-br-gf-32"> <style>#cf-turnstile-gf-32 { margin-left: -15px; }</style> </div> <style> .gf-turnstile-container { width: 100%; } .gform_footer.top_label { display: flex; flex-wrap: wrap; } </style> <script>document.addEventListener("DOMContentLoaded", function() {document.addEventListener('gform/post_render', function handlePostRender(event) {if (event.detail.formId !== 32) {return;}gform.utils.addAsyncFilter('gform/submission/pre_submission', async function handlePreSubmission(data) {document.addEventListener('gform/post_render', function rerenderTurnstile(event) {if (event.detail.formId !== 32) {return;}const turnstileElement = document.getElementById('cf-turnstile-gf-32');if (turnstileElement) {turnstile.remove('#cf-turnstile-gf-32');turnstile.render('#cf-turnstile-gf-32');}document.removeEventListener('gform/post_render', rerenderTurnstile);});gform.utils.removeFilter('gform/submission/pre_submission', handlePreSubmission);return data;});document.removeEventListener('gform/post_render', handlePostRender);});});</script><input type="submit" id="gform_submit_button_32" class="gform_button button" onclick="__gaTracker('send', 'event', { eventCategory: 'Forms', eventAction: 'Subscribe', eventLabel: 'PostFooter'});gform.submission.handleButtonClick(this);" data-submission-type="submit" value="Sign Up"></body></html>
 
            <input type='hidden' class='gform_hidden' name='gform_submission_method' data-js='gform_submission_method_32' value='postback' />
            <input type='hidden' class='gform_hidden' name='gform_theme' data-js='gform_theme_32' id='gform_theme_32' value='legacy' />
            <input type='hidden' class='gform_hidden' name='gform_style_settings' data-js='gform_style_settings_32' id='gform_style_settings_32' value='[]' />
            <input type='hidden' class='gform_hidden' name='is_submit_32' value='1' />
            <input type='hidden' class='gform_hidden' name='gform_submit' value='32' />
            
            <input type='hidden' class='gform_hidden' name='gform_currency' data-currency='USD' value='s0PXi4L/0EfNG3e3zcGZ/5kfS48Z5+EP1kDPm1fw9HYuMiOGuSfw+7JB9CORQmdFFhD60Z+QA+Q1VXsED0RwhvHSaEaau2qXNAg2EGIDrlqVP2o=' />
            <input type='hidden' class='gform_hidden' name='gform_unique_id' value='' />
            <input type='hidden' class='gform_hidden' name='state_32' value='WyJbXSIsIjNhZjRhZTc2ODU5NzRiOTg2YjVjODkwMzk3M2ZhNTE5Il0=' />
            <input type='hidden' autocomplete='off' class='gform_hidden' name='gform_target_page_number_32' id='gform_target_page_number_32' value='0' />
            <input type='hidden' autocomplete='off' class='gform_hidden' name='gform_source_page_number_32' id='gform_source_page_number_32' value='1' />
            <input type='hidden' name='gform_field_values' value='' />
            
        </div>
                        </form>
                        </div><script>
gform.initializeOnLoaded( function() {gformInitSpinner( 32, 'http://webtrainingwheels.com/wp-content/plugins/gravityforms/images/spinner.svg', true );jQuery('#gform_ajax_frame_32').on('load',function(){var contents = jQuery(this).contents().find('*').html();var is_postback = contents.indexOf('GF_AJAX_POSTBACK') >= 0;if(!is_postback){return;}var form_content = jQuery(this).contents().find('#gform_wrapper_32');var is_confirmation = jQuery(this).contents().find('#gform_confirmation_wrapper_32').length > 0;var is_redirect = contents.indexOf('gformRedirect(){') >= 0;var is_form = form_content.length > 0 && ! is_redirect && ! is_confirmation;var mt = parseInt(jQuery('html').css('margin-top'), 10) + parseInt(jQuery('body').css('margin-top'), 10) + 100;if(is_form){jQuery('#gform_wrapper_32').html(form_content.html());if(form_content.hasClass('gform_validation_error')){jQuery('#gform_wrapper_32').addClass('gform_validation_error');} else {jQuery('#gform_wrapper_32').removeClass('gform_validation_error');}setTimeout( function() { /* delay the scroll by 50 milliseconds to fix a bug in chrome */  }, 50 );if(window['gformInitDatepicker']) {gformInitDatepicker();}if(window['gformInitPriceFields']) {gformInitPriceFields();}var current_page = jQuery('#gform_source_page_number_32').val();gformInitSpinner( 32, 'http://webtrainingwheels.com/wp-content/plugins/gravityforms/images/spinner.svg', true );jQuery(document).trigger('gform_page_loaded', [32, current_page]);window['gf_submitting_32'] = false;}else if(!is_redirect){var confirmation_content = jQuery(this).contents().find('.GF_AJAX_POSTBACK').html();if(!confirmation_content){confirmation_content = contents;}jQuery('#gform_wrapper_32').replaceWith(confirmation_content);jQuery(document).trigger('gform_confirmation_loaded', [32]);window['gf_submitting_32'] = false;wp.a11y.speak(jQuery('#gform_confirmation_message_32').text());}else{jQuery('#gform_32').append(contents);if(window['gformRedirect']) {gformRedirect();}}jQuery(document).trigger("gform_pre_post_render", [{ formId: "32", currentPage: "current_page", abort: function() { this.preventDefault(); } }]);        if (event && event.defaultPrevented) {                return;        }        const gformWrapperDiv = document.getElementById( "gform_wrapper_32" );        if ( gformWrapperDiv ) {            const visibilitySpan = document.createElement( "span" );            visibilitySpan.id = "gform_visibility_test_32";            gformWrapperDiv.insertAdjacentElement( "afterend", visibilitySpan );        }        const visibilityTestDiv = document.getElementById( "gform_visibility_test_32" );        let postRenderFired = false;        function triggerPostRender() {            if ( postRenderFired ) {                return;            }            postRenderFired = true;            gform.core.triggerPostRenderEvents( 32, current_page );            if ( visibilityTestDiv ) {                visibilityTestDiv.parentNode.removeChild( visibilityTestDiv );            }        }        function debounce( func, wait, immediate ) {            var timeout;            return function() {                var context = this, args = arguments;                var later = function() {                    timeout = null;                    if ( !immediate ) func.apply( context, args );                };                var callNow = immediate && !timeout;                clearTimeout( timeout );                timeout = setTimeout( later, wait );                if ( callNow ) func.apply( context, args );            };        }        const debouncedTriggerPostRender = debounce( function() {            triggerPostRender();        }, 200 );        if ( visibilityTestDiv && visibilityTestDiv.offsetParent === null ) {            const observer = new MutationObserver( ( mutations ) => {                mutations.forEach( ( mutation ) => {                    if ( mutation.type === 'attributes' && visibilityTestDiv.offsetParent !== null ) {                        debouncedTriggerPostRender();                        observer.disconnect();                    }                });            });            observer.observe( document.body, {                attributes: true,                childList: false,                subtree: true,                attributeFilter: [ 'style', 'class' ],            });        } else {            triggerPostRender();        }    } );} );
</script>
</div>



<p></p>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>The Difference Between WordPress FSE Themes and Classic Themes</title>
		<link>https://webtrainingwheels.com/difference-between-wordpress-fse-themes-classic-themes/</link>
		
		<dc:creator><![CDATA[Lucy]]></dc:creator>
		<pubDate>Mon, 17 Feb 2025 01:26:24 +0000</pubDate>
				<category><![CDATA[WordPress Tutorials - Basic]]></category>
		<category><![CDATA[full site editing]]></category>
		<guid isPermaLink="false">http://webtrainingwheels.com/?p=6171</guid>

					<description><![CDATA[A block theme, or block-based theme, is the same as a full site editing (FSE) theme. A classic theme is one that doesn&#8217;t work with full site editing. Terminology Whether you are a site owner or a developer, there&#8217;s new lingo to learn. Get started with our Full Site Editing glossary. Differences in User Experience ... <p class="read-more-container"><a title="The Difference Between WordPress FSE Themes and Classic Themes" class="read-more button" href="https://webtrainingwheels.com/difference-between-wordpress-fse-themes-classic-themes/#more-6171" aria-label="Read more about The Difference Between WordPress FSE Themes and Classic Themes">Read more</a></p>]]></description>
										<content:encoded><![CDATA[<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" width="740" height="400" src="https://webtrainingwheels.com/wp-content/uploads/2025/02/full-site-editing-feat-740x400-1.jpg" alt="" class="wp-image-6324" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/02/full-site-editing-feat-740x400-1.jpg 740w, https://webtrainingwheels.com/wp-content/uploads/2025/02/full-site-editing-feat-740x400-1-500x270.jpg 500w" sizes="(max-width: 740px) 100vw, 740px" /></figure></div>


<p>A block theme, or block-based theme, is the same as a full site editing (FSE) theme.</p>



<p>A classic theme is one that doesn&#8217;t work with full site editing.</p>



<h2 class="wp-block-heading">Terminology</h2>



<p>Whether you are a site owner or a developer, there&#8217;s new lingo to learn. Get started with our <a href="https://webtrainingwheels.com/wordpress-full-site-editing-glossary/" title="WordPress Full Site Editing Glossary">Full Site Editing glossary.</a></p>



<h2 class="wp-block-heading">Differences in User Experience</h2>



<p>If you use a classic theme, you will still be using the block-based editor for your posts and pages, but you&#8217;ll be dependent on your theme to provide editing capabilities for other parts of your site, like the header, footer etc.</p>



<p>Classic themes  utilize either their own custom options panel, or the WordPress customizer to provide design and other controls.</p>



<span id="more-6171"></span>



<figure class="wp-block-image size-full"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/01/classic-themes-customizer.jpg"><img decoding="async" width="1000" height="597" src="https://webtrainingwheels.com/wp-content/uploads/2025/01/classic-themes-customizer.jpg" alt="" class="wp-image-6184" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/01/classic-themes-customizer.jpg 1000w, https://webtrainingwheels.com/wp-content/uploads/2025/01/classic-themes-customizer-500x299.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/01/classic-themes-customizer-768x458.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></a></figure>



<p>They utilize &#8220;widgets&#8221; as a way to allow users to add pieces of content to sidebars and other parts of the site the theme has designated as widget-enabled. </p>



<figure class="wp-block-image size-full"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/01/classic-themes-widgets.jpg"><img decoding="async" width="1000" height="596" src="https://webtrainingwheels.com/wp-content/uploads/2025/01/classic-themes-widgets.jpg" alt="" class="wp-image-6185" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/01/classic-themes-widgets.jpg 1000w, https://webtrainingwheels.com/wp-content/uploads/2025/01/classic-themes-widgets-500x298.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/01/classic-themes-widgets-768x458.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></a></figure>



<p>Block themes do everything through the new Site Editor.  You&#8217;ll be able to edit more parts of your site using a native WordPress interface. This will provide a more consistent experience no matter which theme you are using. </p>



<p>You will need to get used to the new user interface, and find where the different options are, but after that initial &#8220;culture shock&#8221; it should be a better experience.</p>



<h3 class="wp-block-heading">The Site Editor</h3>



<p>This interface allows you access to edit parts of your site using blocks much more easily. </p>



<figure class="wp-block-image size-full"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-site-editor.jpg"><img decoding="async" width="1000" height="501" src="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-site-editor.jpg" alt="" class="wp-image-6188" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-site-editor.jpg 1000w, https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-site-editor-500x251.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-site-editor-768x385.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></a></figure>



<h4 class="wp-block-heading">Navigation </h4>



<p>Navigation menus now have their own block, and are managed from within the Site Editor: </p>



<figure class="wp-block-image size-full"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-navigation-menu.jpg"><img decoding="async" width="1000" height="351" src="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-navigation-menu.jpg" alt="" class="wp-image-6225" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-navigation-menu.jpg 1000w, https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-navigation-menu-500x176.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-navigation-menu-768x270.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></a></figure>



<p></p>



<h4 class="wp-block-heading">Templates</h4>



<p>Templates control the design of specific types of pages on your site. For example, your category archives have a template, your blog homepage has a template, single posts have a template etc.</p>



<p>You can also create various layouts that you can choose to apply to any page, for example, a layout with a sidebar, one without a sidebar etc.  </p>



<p>In classic themes, unless your theme gave you control, you had to use PHP to do custom layouts templates. </p>



<p>Now templates are available for editing in the Site Editor, using block tools and preset patterns.</p>



<p>As a user, block themes will give you a lot more control over your site, without needing to tinker with code.</p>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-4 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-template-editor.jpg"><img decoding="async" width="1024" height="519" data-id="6228" src="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-template-editor-1024x519.jpg" alt="" class="wp-image-6228" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-template-editor-1024x519.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-template-editor-500x253.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-template-editor-768x389.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-template-editor.jpg 1200w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Edit a template design in the site editor</figcaption></figure>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-templates-woocommerce.jpg"><img decoding="async" width="1024" height="448" data-id="6230" src="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-templates-woocommerce-1024x448.jpg" alt="" class="wp-image-6230" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-templates-woocommerce-1024x448.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-templates-woocommerce-500x219.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-templates-woocommerce-768x336.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-templates-woocommerce.jpg 1500w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">WooCommerce templates</figcaption></figure>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-templates.jpg"><img decoding="async" width="1024" height="448" data-id="6229" src="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-templates-1024x448.jpg" alt="" class="wp-image-6229" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-templates-1024x448.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-templates-500x219.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-templates-768x336.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-templates.jpg 1200w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Theme templates</figcaption></figure>
</figure>



<h4 class="wp-block-heading">Global Styles</h4>



<p>These are preset color palettes and typography styles provided by your theme,  that you can select and edit to style your site. This will allow you to create an aesthetically pleasing site even if you aren&#8217;t a designer. In addition to color palettes and typography, you can also set global styles for specific blocks, set layout widths and more. </p>



<figure class="wp-block-gallery has-nested-images columns-3 is-cropped wp-block-gallery-5 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-styles.jpg"><img decoding="async" width="325" height="800" data-id="6237" src="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-styles.jpg" alt="" class="wp-image-6237" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-styles.jpg 325w, https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-styles-203x500.jpg 203w" sizes="(max-width: 325px) 100vw, 325px" /></a><figcaption class="wp-element-caption">Global styles</figcaption></figure>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-styles-typography.jpg"><img decoding="async" width="364" height="800" data-id="6235" src="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-styles-typography.jpg" alt="" class="wp-image-6235" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-styles-typography.jpg 364w, https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-styles-typography-228x500.jpg 228w" sizes="(max-width: 364px) 100vw, 364px" /></a><figcaption class="wp-element-caption">Typography styles</figcaption></figure>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/01/site-editor-block-styles.jpg"><img decoding="async" width="354" height="800" data-id="6236" src="https://webtrainingwheels.com/wp-content/uploads/2025/01/site-editor-block-styles.jpg" alt="" class="wp-image-6236" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/01/site-editor-block-styles.jpg 354w, https://webtrainingwheels.com/wp-content/uploads/2025/01/site-editor-block-styles-221x500.jpg 221w" sizes="(max-width: 354px) 100vw, 354px" /></a><figcaption class="wp-element-caption">Block styles</figcaption></figure>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-styles-color-palettes.jpg"><img decoding="async" width="1000" height="518" data-id="6238" src="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-styles-color-palettes.jpg" alt="" class="wp-image-6238" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-styles-color-palettes.jpg 1000w, https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-styles-color-palettes-500x259.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-styles-color-palettes-768x398.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></a><figcaption class="wp-element-caption">color palette styles in the template editor</figcaption></figure>
</figure>



<h4 class="wp-block-heading">Patterns</h4>



<p>These are pre-styled  and pre-configured groups of blocks that you can use to make your pages look professionally designed. Patterns are shortcuts to getting a particular look or feature on your page.</p>



<p>They can save you time and make your site look better than if you did everything yourself (assuming you are not a professional designer).</p>



<p>Patterns can be provided by both plugins and your theme. </p>



<p>For example, the Ollie theme provides many patterns for elements such as Calls to Action, and even full page layouts. </p>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-6 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-patterns-ollie-pages.jpg"><img decoding="async" width="1000" height="607" data-id="6241" src="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-patterns-ollie-pages.jpg" alt="" class="wp-image-6241" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-patterns-ollie-pages.jpg 1000w, https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-patterns-ollie-pages-500x304.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-patterns-ollie-pages-768x466.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></a><figcaption class="wp-element-caption">Create page layouts with patterns</figcaption></figure>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-patterns-ollie.jpg"><img decoding="async" width="1000" height="562" data-id="6242" src="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-patterns-ollie.jpg" alt="" class="wp-image-6242" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-patterns-ollie.jpg 1000w, https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-patterns-ollie-500x281.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-patterns-ollie-768x432.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></a><figcaption class="wp-element-caption">Call to Action patterns</figcaption></figure>
</figure>



<p>Once added to a page you can then edit the content as normal.</p>



<h4 class="wp-block-heading">Font library</h4>



<p>The font library feature is by default only available in block themes. It allows you to manage fonts from the WordPress site editor, making it easier for users to control the typography of their site. Themes can install fonts as part of their design. And users can  upload their own, or install them from Google Fonts, and serve them from your own domain.</p>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-7 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><img decoding="async" width="1000" height="673" data-id="6251" src="https://webtrainingwheels.com/wp-content/uploads/2025/02/block-themes-font-library.jpg" alt="" class="wp-image-6251" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/02/block-themes-font-library.jpg 1000w, https://webtrainingwheels.com/wp-content/uploads/2025/02/block-themes-font-library-500x337.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/02/block-themes-font-library-768x517.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px" /><figcaption class="wp-element-caption">Font library</figcaption></figure>



<figure class="wp-block-image size-large"><img decoding="async" width="1000" height="531" data-id="6249" src="https://webtrainingwheels.com/wp-content/uploads/2025/02/block-themes-font-library-upload.jpg" alt="" class="wp-image-6249" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/02/block-themes-font-library-upload.jpg 1000w, https://webtrainingwheels.com/wp-content/uploads/2025/02/block-themes-font-library-upload-500x266.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/02/block-themes-font-library-upload-768x408.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px" /><figcaption class="wp-element-caption">Upload your own fonts</figcaption></figure>



<figure class="wp-block-image size-large"><img decoding="async" width="1000" height="620" data-id="6250" src="https://webtrainingwheels.com/wp-content/uploads/2025/02/font-library-install.jpg" alt="" class="wp-image-6250" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/02/font-library-install.jpg 1000w, https://webtrainingwheels.com/wp-content/uploads/2025/02/font-library-install-500x310.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/02/font-library-install-768x476.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px" /><figcaption class="wp-element-caption">Install Google Fonts and host them on your domain</figcaption></figure>
</figure>



<p>With some code, the font library can be added to classic themes.</p>



<h4 class="wp-block-heading">Consistency</h4>



<p>Although some classic themes give you the same amount of control, the methods and interface will vary form theme to theme. So if you change theme you have to re-learn how  to control it. </p>



<p>With these controls built into a native WordPress system, the experience will be more unified so you won&#8217;t have a learning curve for every theme.</p>



<h2 class="wp-block-heading">Technical differences</h2>



<p>Under the hood a block theme and a classic theme are quite different.</p>



<p>As a developer, the transition might be more difficult because the underlying technology is different and you&#8217;ll have to re-learn how to make a theme. </p>



<p>Classic themes mostly utilize PHP, whereas block themes rely more on HTML, and WordPress&#8217; new block markup. </p>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-8 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-full"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/01/classic-theme-files.jpg"><img decoding="async" width="542" height="978" data-id="6244" src="https://webtrainingwheels.com/wp-content/uploads/2025/01/classic-theme-files.jpg" alt="" class="wp-image-6244" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/01/classic-theme-files.jpg 542w, https://webtrainingwheels.com/wp-content/uploads/2025/01/classic-theme-files-277x500.jpg 277w" sizes="(max-width: 542px) 100vw, 542px" /></a><figcaption class="wp-element-caption">Classic theme files</figcaption></figure>



<figure class="wp-block-image size-full"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-theme-files.jpg"><img decoding="async" width="382" height="800" data-id="6245" src="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-theme-files.jpg" alt="" class="wp-image-6245" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-theme-files.jpg 382w, https://webtrainingwheels.com/wp-content/uploads/2025/01/block-theme-files-239x500.jpg 239w" sizes="(max-width: 382px) 100vw, 382px" /></a><figcaption class="wp-element-caption">Block theme files</figcaption></figure>



<figure class="wp-block-image size-full"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-wordpress-html.jpg"><img decoding="async" width="1000" height="415" data-id="6246" src="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-wordpress-html.jpg" alt="" class="wp-image-6246" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-wordpress-html.jpg 1000w, https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-wordpress-html-500x208.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/01/block-themes-wordpress-html-768x319.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></a><figcaption class="wp-element-caption">WordPress block HTML</figcaption></figure>
</figure>



<p>Whereas functions.php was previously the powerhouse of your theme, themes.json is now doing the heavy lifting.</p>



<p>In some ways this could make theme development a bit more accessible. </p>



<p>On the other hand, creating custom blocks is more complicated and requires JavaScript knowledge. You can create a theme without custom blocks, of course, but taking that next step will be a hurdle. </p>



<p>There are some ways in which the classic theme methodologies are still supported in block themes. For example, if the block theme does not have the relevant template html part, it can fallback to a php file. But that PHP file has to be written in a specific way.</p>



<p><strong>Easier theme switching</strong></p>



<p>Some classic themes relied on elaborate shortcodes to create layouts. That meant if you changed themes, you were left with unrendered shortcodes in your pages. </p>



<p>With everything in blocks, even things like patterns which may have come with your theme, will still render to some extent. They may lose some styling, but your content will still be there in a native WordPress way.</p>



<h2 class="wp-block-heading">What are hybrid themes?</h2>



<p>Hybrid themes are classic themes which have some elements of block themes added to them. They provide a bridge between the two kinds of technologies, in theory giving you the best of both worlds if you&#8217;re not ready to make the jump to block themes. </p>



<h2 class="wp-block-heading">Examples of block themes</h2>



<p>If you are looking to experiment with full site editing and block theme, I recommend you set up a test site using Local WP or a similar tool, and get started. Here&#8217;s a few free themes you can install to play with: </p>



<ul class="wp-block-list">
<li><a href="https://wordpress.org/themes/twentytwentyfive/" target="_blank" rel="noopener" title="">Twenty Twenty Five</a></li>



<li><a href="https://wordpress.org/themes/ollie/" target="_blank" rel="noopener" title="">Ollie</a></li>



<li><a href="https://wordpress.org/themes/spectra-one/" target="_blank" rel="noopener" title="">Spectra One</a></li>



<li><a href="https://wordpress.org/themes/frost/" target="_blank" rel="noopener" title="">Frost</a></li>
</ul>



<p>Check out <a href="https://fullsiteediting.com/themes/" target="_blank" rel="noopener" title="">https://fullsiteediting.com/themes/</a> for a more comprehensive list. </p><div id="webtr-4067860887" class="webtr-content">
                <div class='gf_browser_unknown gform_wrapper gform_legacy_markup_wrapper gform-theme--no-framework' data-form-theme='legacy' data-form-index='0' id='gform_wrapper_32' >
                        <div class='gform_heading'>
                            <h3 class="gform_title">Weekly WordPress Tips To Your Inbox</h3>
                        </div><form method='post' enctype='multipart/form-data'  id='gform_32'  action='/feed/' data-formid='32' novalidate> 
 <input type='hidden' class='gforms-pum' value='{"closepopup":false,"closedelay":0,"openpopup":false,"openpopup_id":0}' />
                        <div class='gform-body gform_body'><ul id='gform_fields_32' class='gform_fields top_label form_sublabel_below description_below validation_below'><li id="field_32_3" class="gfield gfield--type-honeypot gform_validation_container field_sublabel_below gfield--has-description field_description_below field_validation_below gfield_visibility_visible"  ><label class='gfield_label gform-field-label' for='input_32_3'>Email</label><div class='ginput_container'><input name='input_3' id='input_32_3' type='text' value='' autocomplete='new-password'/></div><div class='gfield_description' id='gfield_description_32_3'>This field is for validation purposes and should be left unchanged.</div></li><li id="field_32_1" class="gfield gfield--type-email gfield_contains_required field_sublabel_below gfield--no-description field_description_below field_validation_below gfield_visibility_visible"  ><label class='gfield_label gform-field-label screen-reader-text' for='input_32_1'>Enter Your Email, It&#039;s Free!<span class="gfield_required"><span class="gfield_required gfield_required_asterisk">*</span></span></label><div class='ginput_container ginput_container_email'>
                            <input name='input_1' id='input_32_1' type='email' value='' class='large'   placeholder='Enter Your Email, It&#039;s Free!' aria-required="true" aria-invalid="false"  />
                        </div></li><li id="field_32_2" class="gfield gfield--type-hidden gform_hidden field_sublabel_below gfield--no-description field_description_below field_validation_below gfield_visibility_visible"  ><div class='ginput_container ginput_container_text'><input name='input_2' id='input_32_2' type='hidden' class='gform_hidden'  aria-invalid="false" value='http://webtrainingwheels.com/feed/' /></div></li></ul></div>
        <div class='gform-footer gform_footer top_label'> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body><div class="gf-turnstile-container"> <div id="cf-turnstile-gf-32" class="cf-turnstile" data-callback="turnstileGravityCallback" data-sitekey="0x4AAAAAAA7A0N4QhHj7cf1O" data-theme="light" data-language="auto" data-size="normal" data-retry="auto" data-retry-interval="1000" data-refresh-expired="auto" data-action="gravity-form-32" data-appearance="always"></div> <style>.gform_button { pointer-events: none; opacity: 0.5; }</style> <script>document.addEventListener("DOMContentLoaded", function() { setTimeout(function(){ var e=document.getElementById("cf-turnstile-gf-32"); e&&!e.innerHTML.trim()&&(turnstile.remove("#cf-turnstile-gf-32"), turnstile.render("#cf-turnstile-gf-32", {sitekey:"0x4AAAAAAA7A0N4QhHj7cf1O"})); }, 100); });</script> <br class="cf-turnstile-br cf-turnstile-br-gf-32"> <style>#cf-turnstile-gf-32 { margin-left: -15px; }</style> </div> <style> .gf-turnstile-container { width: 100%; } .gform_footer.top_label { display: flex; flex-wrap: wrap; } </style> <script>document.addEventListener("DOMContentLoaded", function() {document.addEventListener('gform/post_render', function handlePostRender(event) {if (event.detail.formId !== 32) {return;}gform.utils.addAsyncFilter('gform/submission/pre_submission', async function handlePreSubmission(data) {document.addEventListener('gform/post_render', function rerenderTurnstile(event) {if (event.detail.formId !== 32) {return;}const turnstileElement = document.getElementById('cf-turnstile-gf-32');if (turnstileElement) {turnstile.remove('#cf-turnstile-gf-32');turnstile.render('#cf-turnstile-gf-32');}document.removeEventListener('gform/post_render', rerenderTurnstile);});gform.utils.removeFilter('gform/submission/pre_submission', handlePreSubmission);return data;});document.removeEventListener('gform/post_render', handlePostRender);});});</script><input type="submit" id="gform_submit_button_32" class="gform_button button" onclick="__gaTracker('send', 'event', { eventCategory: 'Forms', eventAction: 'Subscribe', eventLabel: 'PostFooter'});gform.submission.handleButtonClick(this);" data-submission-type="submit" value="Sign Up"></body></html>
 
            <input type='hidden' class='gform_hidden' name='gform_submission_method' data-js='gform_submission_method_32' value='postback' />
            <input type='hidden' class='gform_hidden' name='gform_theme' data-js='gform_theme_32' id='gform_theme_32' value='legacy' />
            <input type='hidden' class='gform_hidden' name='gform_style_settings' data-js='gform_style_settings_32' id='gform_style_settings_32' value='[]' />
            <input type='hidden' class='gform_hidden' name='is_submit_32' value='1' />
            <input type='hidden' class='gform_hidden' name='gform_submit' value='32' />
            
            <input type='hidden' class='gform_hidden' name='gform_currency' data-currency='USD' value='Xl2s0Bk6j/mBtQP5mcarAljqAiEmkKlCzkHS+4RTUASe+Tt2nuW5FORw96ZIiOMPiM68lWZGze4rgvwhExIyeql4wyCjMh2ii9n5BpIwPPgrSIA=' />
            <input type='hidden' class='gform_hidden' name='gform_unique_id' value='' />
            <input type='hidden' class='gform_hidden' name='state_32' value='WyJbXSIsIjNhZjRhZTc2ODU5NzRiOTg2YjVjODkwMzk3M2ZhNTE5Il0=' />
            <input type='hidden' autocomplete='off' class='gform_hidden' name='gform_target_page_number_32' id='gform_target_page_number_32' value='0' />
            <input type='hidden' autocomplete='off' class='gform_hidden' name='gform_source_page_number_32' id='gform_source_page_number_32' value='1' />
            <input type='hidden' name='gform_field_values' value='' />
            
        </div>
                        </form>
                        </div><script>
gform.initializeOnLoaded( function() {gformInitSpinner( 32, 'http://webtrainingwheels.com/wp-content/plugins/gravityforms/images/spinner.svg', true );jQuery('#gform_ajax_frame_32').on('load',function(){var contents = jQuery(this).contents().find('*').html();var is_postback = contents.indexOf('GF_AJAX_POSTBACK') >= 0;if(!is_postback){return;}var form_content = jQuery(this).contents().find('#gform_wrapper_32');var is_confirmation = jQuery(this).contents().find('#gform_confirmation_wrapper_32').length > 0;var is_redirect = contents.indexOf('gformRedirect(){') >= 0;var is_form = form_content.length > 0 && ! is_redirect && ! is_confirmation;var mt = parseInt(jQuery('html').css('margin-top'), 10) + parseInt(jQuery('body').css('margin-top'), 10) + 100;if(is_form){jQuery('#gform_wrapper_32').html(form_content.html());if(form_content.hasClass('gform_validation_error')){jQuery('#gform_wrapper_32').addClass('gform_validation_error');} else {jQuery('#gform_wrapper_32').removeClass('gform_validation_error');}setTimeout( function() { /* delay the scroll by 50 milliseconds to fix a bug in chrome */  }, 50 );if(window['gformInitDatepicker']) {gformInitDatepicker();}if(window['gformInitPriceFields']) {gformInitPriceFields();}var current_page = jQuery('#gform_source_page_number_32').val();gformInitSpinner( 32, 'http://webtrainingwheels.com/wp-content/plugins/gravityforms/images/spinner.svg', true );jQuery(document).trigger('gform_page_loaded', [32, current_page]);window['gf_submitting_32'] = false;}else if(!is_redirect){var confirmation_content = jQuery(this).contents().find('.GF_AJAX_POSTBACK').html();if(!confirmation_content){confirmation_content = contents;}jQuery('#gform_wrapper_32').replaceWith(confirmation_content);jQuery(document).trigger('gform_confirmation_loaded', [32]);window['gf_submitting_32'] = false;wp.a11y.speak(jQuery('#gform_confirmation_message_32').text());}else{jQuery('#gform_32').append(contents);if(window['gformRedirect']) {gformRedirect();}}jQuery(document).trigger("gform_pre_post_render", [{ formId: "32", currentPage: "current_page", abort: function() { this.preventDefault(); } }]);        if (event && event.defaultPrevented) {                return;        }        const gformWrapperDiv = document.getElementById( "gform_wrapper_32" );        if ( gformWrapperDiv ) {            const visibilitySpan = document.createElement( "span" );            visibilitySpan.id = "gform_visibility_test_32";            gformWrapperDiv.insertAdjacentElement( "afterend", visibilitySpan );        }        const visibilityTestDiv = document.getElementById( "gform_visibility_test_32" );        let postRenderFired = false;        function triggerPostRender() {            if ( postRenderFired ) {                return;            }            postRenderFired = true;            gform.core.triggerPostRenderEvents( 32, current_page );            if ( visibilityTestDiv ) {                visibilityTestDiv.parentNode.removeChild( visibilityTestDiv );            }        }        function debounce( func, wait, immediate ) {            var timeout;            return function() {                var context = this, args = arguments;                var later = function() {                    timeout = null;                    if ( !immediate ) func.apply( context, args );                };                var callNow = immediate && !timeout;                clearTimeout( timeout );                timeout = setTimeout( later, wait );                if ( callNow ) func.apply( context, args );            };        }        const debouncedTriggerPostRender = debounce( function() {            triggerPostRender();        }, 200 );        if ( visibilityTestDiv && visibilityTestDiv.offsetParent === null ) {            const observer = new MutationObserver( ( mutations ) => {                mutations.forEach( ( mutation ) => {                    if ( mutation.type === 'attributes' && visibilityTestDiv.offsetParent !== null ) {                        debouncedTriggerPostRender();                        observer.disconnect();                    }                });            });            observer.observe( document.body, {                attributes: true,                childList: false,                subtree: true,                attributeFilter: [ 'style', 'class' ],            });        } else {            triggerPostRender();        }    } );} );
</script>
</div>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>WordPress Block Patterns Explained</title>
		<link>https://webtrainingwheels.com/wordpress-block-patterns/</link>
		
		<dc:creator><![CDATA[Lucy]]></dc:creator>
		<pubDate>Mon, 17 Feb 2025 01:26:09 +0000</pubDate>
				<category><![CDATA[WordPress Tutorials - Basic]]></category>
		<category><![CDATA[full site editing]]></category>
		<guid isPermaLink="false">https://webtrainingwheels.com/?p=6266</guid>

					<description><![CDATA[WordPress block patterns are mini-templates. They are pre-configured groups of blocks that give you shortcuts to creating certain features on your site, like a call to action, a nice-looking hero image with text, or even a whole page layout. They are available to insert on any page, and then the content can be edited. Below ... <p class="read-more-container"><a title="WordPress Block Patterns Explained" class="read-more button" href="https://webtrainingwheels.com/wordpress-block-patterns/#more-6266" aria-label="Read more about WordPress Block Patterns Explained">Read more</a></p>]]></description>
										<content:encoded><![CDATA[<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" width="620" height="250" src="https://webtrainingwheels.com/wp-content/uploads/2025/02/patterns-feat-620x250-2.jpg" alt="" class="wp-image-6312" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/02/patterns-feat-620x250-2.jpg 620w, https://webtrainingwheels.com/wp-content/uploads/2025/02/patterns-feat-620x250-2-500x202.jpg 500w" sizes="(max-width: 620px) 100vw, 620px" /></figure></div>


<p></p>



<p>WordPress block patterns are mini-templates. They are pre-configured groups of blocks that give you shortcuts to creating certain features on your site, like a call to action, a nice-looking hero image with text, or even a whole page layout.</p>



<p>They are available to insert on any page, and then the content can be edited.</p>



<span id="more-6266"></span>



<p>Below is the Testimonial Card pattern from the Ollie theme. Once added to your page you can see it is composed of a group of blocks, designed and configured for you. You can edit them just like normal blocks.</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;69d718849e7e2&quot;}" data-wp-interactive="core/image" class="wp-block-image size-full wp-lightbox-container"><img decoding="async" width="1000" height="295" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on-async--click="actions.showLightbox" data-wp-on-async--load="callbacks.setButtonStyles" data-wp-on-async-window--resize="callbacks.setButtonStyles" src="https://webtrainingwheels.com/wp-content/uploads/2025/02/pattern-is-a-group-of-blocks.jpg" alt="" class="wp-image-6277" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/02/pattern-is-a-group-of-blocks.jpg 1000w, https://webtrainingwheels.com/wp-content/uploads/2025/02/pattern-is-a-group-of-blocks-500x148.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/02/pattern-is-a-group-of-blocks-768x227.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="Enlarge image"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on-async--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p><br>The confusing part is that there are 3 kinds of Patterns:</p>



<ul class="wp-block-list">
<li>Unsynced</li>



<li>Synced</li>



<li>Partially synced</li>
</ul>



<p>I&#8217;ll explain the differences and how to utilize them in your content.</p>



<h2 class="wp-block-heading">Unsynced patterns</h2>



<p>Once an unsynced pattern has been added to a page, it functions like any other block and is independent of other instances of the same pattern. </p>



<p>So if you have added the same pattern on several pages, making a change to one of those changes only the once you edited. The same pattern on other pages will remain unchanged. </p>



<p>You can either add an existing pattern from the pattern library, or create one from scratch.</p>



<p><strong>To add an existing pattern</strong>:</p>



<ul class="wp-block-list">
<li>In your post or page click the Block Inserter&nbsp; button and then click <em>Patterns</em>.</li>



<li>Choose your pattern</li>
</ul>



<figure class="wp-block-image size-medium"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/02/insert-pattern.jpg"><img decoding="async" width="500" height="470" src="https://webtrainingwheels.com/wp-content/uploads/2025/02/insert-pattern-500x470.jpg" alt="" class="wp-image-6270" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/02/insert-pattern-500x470.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/02/insert-pattern-768x722.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2025/02/insert-pattern.jpg 1000w" sizes="(max-width: 500px) 100vw, 500px" /></a></figure>



<p>Once it&#8217;s in your page, you can make changes to it, and it only changes it on that specific page.</p>



<p>If you want to customize it and save your own version of it, make your changes, then</p>



<ul class="wp-block-list">
<li>Select the pattern in the <em>List View</em>, then click the 3 dots and choose <em>Create Pattern</em></li>



<li>Give it a name and choose the category</li>



<li>At the bottom you have the toggle to choose whether it&#8217;s synced or not. The default is set to synced. Click it to toggle off.</li>
</ul>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-9 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-full"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/02/create-pattern.jpg"><img decoding="async" width="1000" height="692" data-id="6279" src="https://webtrainingwheels.com/wp-content/uploads/2025/02/create-pattern.jpg" alt="" class="wp-image-6279" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/02/create-pattern.jpg 1000w, https://webtrainingwheels.com/wp-content/uploads/2025/02/create-pattern-500x346.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/02/create-pattern-768x531.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></a></figure>



<figure class="wp-block-image size-full"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/02/add-new-pattern-unsynced.jpg"><img decoding="async" width="728" height="798" data-id="6282" src="https://webtrainingwheels.com/wp-content/uploads/2025/02/add-new-pattern-unsynced.jpg" alt="" class="wp-image-6282" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/02/add-new-pattern-unsynced.jpg 728w, https://webtrainingwheels.com/wp-content/uploads/2025/02/add-new-pattern-unsynced-456x500.jpg 456w" sizes="(max-width: 728px) 100vw, 728px" /></a></figure>
</figure>



<p>You can also get to that from the toolbar:</p>



<figure class="wp-block-image size-full"><img decoding="async" width="1000" height="570" src="https://webtrainingwheels.com/wp-content/uploads/2025/02/create-pattern-toolbar.jpg" alt="" class="wp-image-6281" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/02/create-pattern-toolbar.jpg 1000w, https://webtrainingwheels.com/wp-content/uploads/2025/02/create-pattern-toolbar-500x285.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/02/create-pattern-toolbar-768x438.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></figure>



<p>Now you have a custom pattern you can add to any post/page. It&#8217;s specific to each place you insert it and if you make changes to it, it is only changed on that specific place.</p>



<p><strong>Make your own pattern from scratch</strong></p>



<ul class="wp-block-list">
<li>After creating an element or layout you like in your page, select the block or blocks that you want to make into a pattern. </li>



<li>Click the 3 buttons, then choose create pattern.</li>
</ul>



<p>Then it will be available to add to any page easily from the Pattern library.</p>



<h2 class="wp-block-heading">Synced patterns</h2>



<p>In previous versions of WordPress, synced patterns were known as reusable blocks.</p>



<p>When a pattern is synced it means that you can make a change to it in one place and that change will update all instances of the pattern across your site.</p>



<p>So this is good for more dynamic content that you may want to update periodically. It allows you to make one update that affects each place you&#8217;ve added the pattern across your whole site.</p>



<p><strong>To create a synced pattern:</strong></p>



<p>Make a new pattern as described above, but toggle on the synced option when saving it.</p>



<figure class="wp-block-image size-medium is-resized"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/02/create-new-synced-pattern.jpg"><img decoding="async" width="476" height="500" src="https://webtrainingwheels.com/wp-content/uploads/2025/02/create-new-synced-pattern-476x500.jpg" alt="" class="wp-image-6285" style="width:308px;height:auto" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/02/create-new-synced-pattern-476x500.jpg 476w, https://webtrainingwheels.com/wp-content/uploads/2025/02/create-new-synced-pattern.jpg 600w" sizes="(max-width: 476px) 100vw, 476px" /></a></figure>



<p>To differentiate unsynced patterns from synced (or partially synced) patterns, synced have a purple icon when viewing them in the pattern library or in the list view:</p>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-10 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/02/purple-icon-list.jpg"><img decoding="async" width="600" height="508" data-id="6292" src="https://webtrainingwheels.com/wp-content/uploads/2025/02/purple-icon-list.jpg" alt="" class="wp-image-6292" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/02/purple-icon-list.jpg 600w, https://webtrainingwheels.com/wp-content/uploads/2025/02/purple-icon-list-500x423.jpg 500w" sizes="(max-width: 600px) 100vw, 600px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/02/pattern-library-icon.jpg"><img decoding="async" width="800" height="610" data-id="6293" src="https://webtrainingwheels.com/wp-content/uploads/2025/02/pattern-library-icon.jpg" alt="" class="wp-image-6293" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/02/pattern-library-icon.jpg 800w, https://webtrainingwheels.com/wp-content/uploads/2025/02/pattern-library-icon-500x381.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/02/pattern-library-icon-768x586.jpg 768w" sizes="(max-width: 800px) 100vw, 800px" /></a></figure>
</figure>



<p></p>



<p><strong>Edit a Synced Pattern</strong></p>



<p>If you are in a post or page where the synced pattern has been added, you will see the <em>Edit Original </em>option.</p>



<figure class="wp-block-image size-full"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/02/synced-pattern-edit.jpg"><img decoding="async" width="1000" height="474" src="https://webtrainingwheels.com/wp-content/uploads/2025/02/synced-pattern-edit.jpg" alt="" class="wp-image-6296" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/02/synced-pattern-edit.jpg 1000w, https://webtrainingwheels.com/wp-content/uploads/2025/02/synced-pattern-edit-500x237.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/02/synced-pattern-edit-768x364.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></a></figure>



<p>When you click this, you are taken into a pattern editing screen:</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="417" src="https://webtrainingwheels.com/wp-content/uploads/2025/02/synced-pattern-editing-1024x417.jpg" alt="" class="wp-image-6300" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/02/synced-pattern-editing-1024x417.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2025/02/synced-pattern-editing-500x204.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/02/synced-pattern-editing-768x313.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2025/02/synced-pattern-editing.jpg 1300w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>After making and saving your edits, the pattern will be updated in every place you used it on your site.</p>



<h4 class="wp-block-heading"><strong>When to use Synced vs Unsynced patterns</strong></h4>



<p>Is it content that you&#8217;re going to have in multiple places on your site?</p>



<p>And will it be the same in all those places and may need to be updated at some point?</p>



<p>Then it should be synced.</p>



<p>Examples:</p>



<p><strong>Business hours</strong><br>Your business hours may be displayed in multiple places across your site, and the information will be the same in all those cases.  </p>



<p>But you might want to update it for holidays, for example. So in that case a synced pattern will be perfect &#8211; you make the update once and you&#8217;re done.</p>



<p><strong>Team directory</strong></p>



<p>Imagine you show a list of company members in multiple places. </p>



<p>But what if you hire someone new or a team member leaves? You&#8217;ll need to update the list and a synced pattern will let you update that once, and have it be updated across your site. </p>



<p></p>



<h2 class="wp-block-heading">Partially synced patterns / overrides</h2>



<p>Partially synced patterns are a hybrid, where only some specific elements within the pattern are synced.</p>



<p>These are also known as Overrides.</p>



<p>This gives you a potentially very flexible pattern.</p>



<h4 class="wp-block-heading">How to create a partially synced pattern</h4>



<ul class="wp-block-list">
<li>When editing your pattern, select a specific block. In the example below, of a Call to Action pattern, I&#8217;ve selected the button.</li>



<li>Make sure you&#8217;re in the Block settings in the right panel, and expand the Advanced panel.</li>



<li>There you will see the <em>Enable overrides</em> button. Clicking that allows syncing for that specific element.</li>



<li>You will then see a popup where you name that specific synced element</li>
</ul>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-11 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/02/enable-overrides.jpg"><img decoding="async" width="1024" height="582" data-id="6302" src="https://webtrainingwheels.com/wp-content/uploads/2025/02/enable-overrides-1024x582.jpg" alt="" class="wp-image-6302" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/02/enable-overrides-1024x582.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2025/02/enable-overrides-500x284.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/02/enable-overrides-768x436.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2025/02/enable-overrides.jpg 1200w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/02/enable-overrides-modal.jpg"><img decoding="async" width="600" height="589" data-id="6303" src="https://webtrainingwheels.com/wp-content/uploads/2025/02/enable-overrides-modal.jpg" alt="" class="wp-image-6303" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/02/enable-overrides-modal.jpg 600w, https://webtrainingwheels.com/wp-content/uploads/2025/02/enable-overrides-modal-500x491.jpg 500w" sizes="(max-width: 600px) 100vw, 600px" /></a></figure>
</figure>



<p>Now when this pattern is added to your content you will notice a couple of things:</p>



<ul class="wp-block-list">
<li>In List view, the partially synced element/block is visible, because it&#8217;s editable</li>



<li>I can change the text of the button for this specific instance</li>



<li>So now I can have multiple versions of this pattern, where I can have some custom elements specific to each instance and some elements that will be updated in all cases.</li>
</ul>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/02/partially-synced-list-view.jpg"><img decoding="async" width="1024" height="399" src="https://webtrainingwheels.com/wp-content/uploads/2025/02/partially-synced-list-view-1024x399.jpg" alt="" class="wp-image-6304" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/02/partially-synced-list-view-1024x399.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2025/02/partially-synced-list-view-500x195.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/02/partially-synced-list-view-768x300.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2025/02/partially-synced-list-view.jpg 1200w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>The only drawback here is that at the time of writing, only certain blocks are eligible for partial syncing. I expect more and more blocks will be supported over time. But if you don&#8217;t see the Enable overrides button on your synced pattern, this is likely why.</p>



<p>The <em>Reset</em> button will remove any edits you made to the partially synced block and reset it to its original state.</p>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/02/partial-sync-reset.jpg"><img decoding="async" width="1024" height="463" src="https://webtrainingwheels.com/wp-content/uploads/2025/02/partial-sync-reset-1024x463.jpg" alt="" class="wp-image-6305" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/02/partial-sync-reset-1024x463.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2025/02/partial-sync-reset-500x226.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/02/partial-sync-reset-768x347.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2025/02/partial-sync-reset.jpg 1200w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<h3 class="wp-block-heading">How to delete a pattern entirely</h3>



<p><strong>Use the site editor</strong></p>



<ul class="wp-block-list">
<li>Click on <em>Patterns</em></li>



<li>Find your pattern and click the 3 dots</li>



<li>Click <em>Delete</em></li>
</ul>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/02/delete-pattern.jpg"><img decoding="async" width="1024" height="567" src="https://webtrainingwheels.com/wp-content/uploads/2025/02/delete-pattern-1024x567.jpg" alt="" class="wp-image-6308" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/02/delete-pattern-1024x567.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2025/02/delete-pattern-500x277.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/02/delete-pattern-768x425.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2025/02/delete-pattern.jpg 1200w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p><strong>From the post/page edit screen</strong></p><div id="webtr-1416967578" class="webtr-content">
                <div class='gf_browser_unknown gform_wrapper gform_legacy_markup_wrapper gform-theme--no-framework' data-form-theme='legacy' data-form-index='0' id='gform_wrapper_32' >
                        <div class='gform_heading'>
                            <h3 class="gform_title">Weekly WordPress Tips To Your Inbox</h3>
                        </div><form method='post' enctype='multipart/form-data'  id='gform_32'  action='/feed/' data-formid='32' novalidate> 
 <input type='hidden' class='gforms-pum' value='{"closepopup":false,"closedelay":0,"openpopup":false,"openpopup_id":0}' />
                        <div class='gform-body gform_body'><ul id='gform_fields_32' class='gform_fields top_label form_sublabel_below description_below validation_below'><li id="field_32_3" class="gfield gfield--type-honeypot gform_validation_container field_sublabel_below gfield--has-description field_description_below field_validation_below gfield_visibility_visible"  ><label class='gfield_label gform-field-label' for='input_32_3'>LinkedIn</label><div class='ginput_container'><input name='input_3' id='input_32_3' type='text' value='' autocomplete='new-password'/></div><div class='gfield_description' id='gfield_description_32_3'>This field is for validation purposes and should be left unchanged.</div></li><li id="field_32_1" class="gfield gfield--type-email gfield_contains_required field_sublabel_below gfield--no-description field_description_below field_validation_below gfield_visibility_visible"  ><label class='gfield_label gform-field-label screen-reader-text' for='input_32_1'>Enter Your Email, It&#039;s Free!<span class="gfield_required"><span class="gfield_required gfield_required_asterisk">*</span></span></label><div class='ginput_container ginput_container_email'>
                            <input name='input_1' id='input_32_1' type='email' value='' class='large'   placeholder='Enter Your Email, It&#039;s Free!' aria-required="true" aria-invalid="false"  />
                        </div></li><li id="field_32_2" class="gfield gfield--type-hidden gform_hidden field_sublabel_below gfield--no-description field_description_below field_validation_below gfield_visibility_visible"  ><div class='ginput_container ginput_container_text'><input name='input_2' id='input_32_2' type='hidden' class='gform_hidden'  aria-invalid="false" value='http://webtrainingwheels.com/feed/' /></div></li></ul></div>
        <div class='gform-footer gform_footer top_label'> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body><div class="gf-turnstile-container"> <div id="cf-turnstile-gf-32" class="cf-turnstile" data-callback="turnstileGravityCallback" data-sitekey="0x4AAAAAAA7A0N4QhHj7cf1O" data-theme="light" data-language="auto" data-size="normal" data-retry="auto" data-retry-interval="1000" data-refresh-expired="auto" data-action="gravity-form-32" data-appearance="always"></div> <style>.gform_button { pointer-events: none; opacity: 0.5; }</style> <script>document.addEventListener("DOMContentLoaded", function() { setTimeout(function(){ var e=document.getElementById("cf-turnstile-gf-32"); e&&!e.innerHTML.trim()&&(turnstile.remove("#cf-turnstile-gf-32"), turnstile.render("#cf-turnstile-gf-32", {sitekey:"0x4AAAAAAA7A0N4QhHj7cf1O"})); }, 100); });</script> <br class="cf-turnstile-br cf-turnstile-br-gf-32"> <style>#cf-turnstile-gf-32 { margin-left: -15px; }</style> </div> <style> .gf-turnstile-container { width: 100%; } .gform_footer.top_label { display: flex; flex-wrap: wrap; } </style> <script>document.addEventListener("DOMContentLoaded", function() {document.addEventListener('gform/post_render', function handlePostRender(event) {if (event.detail.formId !== 32) {return;}gform.utils.addAsyncFilter('gform/submission/pre_submission', async function handlePreSubmission(data) {document.addEventListener('gform/post_render', function rerenderTurnstile(event) {if (event.detail.formId !== 32) {return;}const turnstileElement = document.getElementById('cf-turnstile-gf-32');if (turnstileElement) {turnstile.remove('#cf-turnstile-gf-32');turnstile.render('#cf-turnstile-gf-32');}document.removeEventListener('gform/post_render', rerenderTurnstile);});gform.utils.removeFilter('gform/submission/pre_submission', handlePreSubmission);return data;});document.removeEventListener('gform/post_render', handlePostRender);});});</script><input type="submit" id="gform_submit_button_32" class="gform_button button" onclick="__gaTracker('send', 'event', { eventCategory: 'Forms', eventAction: 'Subscribe', eventLabel: 'PostFooter'});gform.submission.handleButtonClick(this);" data-submission-type="submit" value="Sign Up"></body></html>
 
            <input type='hidden' class='gform_hidden' name='gform_submission_method' data-js='gform_submission_method_32' value='postback' />
            <input type='hidden' class='gform_hidden' name='gform_theme' data-js='gform_theme_32' id='gform_theme_32' value='legacy' />
            <input type='hidden' class='gform_hidden' name='gform_style_settings' data-js='gform_style_settings_32' id='gform_style_settings_32' value='[]' />
            <input type='hidden' class='gform_hidden' name='is_submit_32' value='1' />
            <input type='hidden' class='gform_hidden' name='gform_submit' value='32' />
            
            <input type='hidden' class='gform_hidden' name='gform_currency' data-currency='USD' value='zIUDOdgrHCm5yhXKo2dm/1MUzvtgTWgjsuxIjmyBmj6nN40rUPk9hd1P+IWjuBSNGsCYG9PXbiurCDQnL4uQDDJ1dWZrVwYH2g8/UeNoUGk9vRg=' />
            <input type='hidden' class='gform_hidden' name='gform_unique_id' value='' />
            <input type='hidden' class='gform_hidden' name='state_32' value='WyJbXSIsIjNhZjRhZTc2ODU5NzRiOTg2YjVjODkwMzk3M2ZhNTE5Il0=' />
            <input type='hidden' autocomplete='off' class='gform_hidden' name='gform_target_page_number_32' id='gform_target_page_number_32' value='0' />
            <input type='hidden' autocomplete='off' class='gform_hidden' name='gform_source_page_number_32' id='gform_source_page_number_32' value='1' />
            <input type='hidden' name='gform_field_values' value='' />
            
        </div>
                        </form>
                        </div><script>
gform.initializeOnLoaded( function() {gformInitSpinner( 32, 'http://webtrainingwheels.com/wp-content/plugins/gravityforms/images/spinner.svg', true );jQuery('#gform_ajax_frame_32').on('load',function(){var contents = jQuery(this).contents().find('*').html();var is_postback = contents.indexOf('GF_AJAX_POSTBACK') >= 0;if(!is_postback){return;}var form_content = jQuery(this).contents().find('#gform_wrapper_32');var is_confirmation = jQuery(this).contents().find('#gform_confirmation_wrapper_32').length > 0;var is_redirect = contents.indexOf('gformRedirect(){') >= 0;var is_form = form_content.length > 0 && ! is_redirect && ! is_confirmation;var mt = parseInt(jQuery('html').css('margin-top'), 10) + parseInt(jQuery('body').css('margin-top'), 10) + 100;if(is_form){jQuery('#gform_wrapper_32').html(form_content.html());if(form_content.hasClass('gform_validation_error')){jQuery('#gform_wrapper_32').addClass('gform_validation_error');} else {jQuery('#gform_wrapper_32').removeClass('gform_validation_error');}setTimeout( function() { /* delay the scroll by 50 milliseconds to fix a bug in chrome */  }, 50 );if(window['gformInitDatepicker']) {gformInitDatepicker();}if(window['gformInitPriceFields']) {gformInitPriceFields();}var current_page = jQuery('#gform_source_page_number_32').val();gformInitSpinner( 32, 'http://webtrainingwheels.com/wp-content/plugins/gravityforms/images/spinner.svg', true );jQuery(document).trigger('gform_page_loaded', [32, current_page]);window['gf_submitting_32'] = false;}else if(!is_redirect){var confirmation_content = jQuery(this).contents().find('.GF_AJAX_POSTBACK').html();if(!confirmation_content){confirmation_content = contents;}jQuery('#gform_wrapper_32').replaceWith(confirmation_content);jQuery(document).trigger('gform_confirmation_loaded', [32]);window['gf_submitting_32'] = false;wp.a11y.speak(jQuery('#gform_confirmation_message_32').text());}else{jQuery('#gform_32').append(contents);if(window['gformRedirect']) {gformRedirect();}}jQuery(document).trigger("gform_pre_post_render", [{ formId: "32", currentPage: "current_page", abort: function() { this.preventDefault(); } }]);        if (event && event.defaultPrevented) {                return;        }        const gformWrapperDiv = document.getElementById( "gform_wrapper_32" );        if ( gformWrapperDiv ) {            const visibilitySpan = document.createElement( "span" );            visibilitySpan.id = "gform_visibility_test_32";            gformWrapperDiv.insertAdjacentElement( "afterend", visibilitySpan );        }        const visibilityTestDiv = document.getElementById( "gform_visibility_test_32" );        let postRenderFired = false;        function triggerPostRender() {            if ( postRenderFired ) {                return;            }            postRenderFired = true;            gform.core.triggerPostRenderEvents( 32, current_page );            if ( visibilityTestDiv ) {                visibilityTestDiv.parentNode.removeChild( visibilityTestDiv );            }        }        function debounce( func, wait, immediate ) {            var timeout;            return function() {                var context = this, args = arguments;                var later = function() {                    timeout = null;                    if ( !immediate ) func.apply( context, args );                };                var callNow = immediate && !timeout;                clearTimeout( timeout );                timeout = setTimeout( later, wait );                if ( callNow ) func.apply( context, args );            };        }        const debouncedTriggerPostRender = debounce( function() {            triggerPostRender();        }, 200 );        if ( visibilityTestDiv && visibilityTestDiv.offsetParent === null ) {            const observer = new MutationObserver( ( mutations ) => {                mutations.forEach( ( mutation ) => {                    if ( mutation.type === 'attributes' && visibilityTestDiv.offsetParent !== null ) {                        debouncedTriggerPostRender();                        observer.disconnect();                    }                });            });            observer.observe( document.body, {                attributes: true,                childList: false,                subtree: true,                attributeFilter: [ 'style', 'class' ],            });        } else {            triggerPostRender();        }    } );} );
</script>
</div>



<ul class="wp-block-list">
<li>Click <em>Edit Original</em></li>



<li>Click the 3 dots on the right</li>



<li>Click <em>Delete</em></li>
</ul>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2025/02/edit-original-delete.jpg"><img decoding="async" width="1024" height="480" src="https://webtrainingwheels.com/wp-content/uploads/2025/02/edit-original-delete-1024x480.jpg" alt="" class="wp-image-6309" srcset="https://webtrainingwheels.com/wp-content/uploads/2025/02/edit-original-delete-1024x480.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2025/02/edit-original-delete-500x234.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2025/02/edit-original-delete-768x360.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2025/02/edit-original-delete.jpg 1200w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Preconnect to Required Origins in WordPress</title>
		<link>https://webtrainingwheels.com/preconnect-to-required-origins-in-wordpress/</link>
		
		<dc:creator><![CDATA[Lucy]]></dc:creator>
		<pubDate>Thu, 04 Jan 2024 23:22:22 +0000</pubDate>
				<category><![CDATA[Speed Optimization]]></category>
		<guid isPermaLink="false">https://webtrainingwheels.com/?p=6113</guid>

					<description><![CDATA[Preconnect to required origins is a PageSpeed recommendation that you may see if your site loads files from external domains. It can be satisfied by adding either preconnect or dns-prefetch directives to your page. preconnect and dns-prefetch are types of &#8220;resource hints&#8221; which are used to try and speed up the loading of files hosted ... <p class="read-more-container"><a title="Preconnect to Required Origins in WordPress" class="read-more button" href="https://webtrainingwheels.com/preconnect-to-required-origins-in-wordpress/#more-6113" aria-label="Read more about Preconnect to Required Origins in WordPress">Read more</a></p>]]></description>
										<content:encoded><![CDATA[<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" width="620" height="250" src="https://webtrainingwheels.com/wp-content/uploads/2024/01/preconnect-to-required-origins-620x250-1.jpg" alt="" class="wp-image-6144" srcset="https://webtrainingwheels.com/wp-content/uploads/2024/01/preconnect-to-required-origins-620x250-1.jpg 620w, https://webtrainingwheels.com/wp-content/uploads/2024/01/preconnect-to-required-origins-620x250-1-500x202.jpg 500w" sizes="(max-width: 620px) 100vw, 620px" /></figure></div>


<p><a href="https://webtrainingwheels.com/google-pagespeed-insights-guide-wordpress/" data-type="post" data-id="3444">Preconnect to required origins is a PageSpeed recommendation</a> that you may see if your site loads files from external domains. It can  be satisfied by adding either <code>preconnect</code> or <code>dns-prefetch</code> directives to your page.</p>



<p><code>preconnect</code> and <code>dns-prefetch</code> are types of &#8220;resource hints&#8221; which are used to try and speed up the loading of files hosted on 3rd party domains.</p>



<p>Resource hints are small pieces of HTML that are added to the page, to communicate to the browser to start specific tasks as soon as possible.</p>



<p>This is what resource hints look like in the HTML of a page:</p>


<pre class="wp-block-code"><span><code class="hljs language-xml"><span class="hljs-tag">&lt;<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">'dns-prefetch'</span> <span class="hljs-attr">href</span>=<span class="hljs-string">'//fonts.googleapis.com'</span> /&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">link</span> <span class="hljs-attr">href</span>=<span class="hljs-string">'https://fonts.gstatic.com'</span> <span class="hljs-attr">crossorigin</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">'preconnect'</span> /&gt;</span></code></span></pre>


<p>Don&#8217;t get this confused with <a href="https://webtrainingwheels.com/how-to-preload-key-requests-in-wordpress/" data-type="post" data-id="4276"><code>preload</code>, another type of resource hint, which is used for specific files</a>.</p>



<p>In this article I&#8217;ll explain the difference between preconnect and prefetch, which you should use, and how to add these to your site.</p>



<span id="more-6113"></span>






<h2 class="wp-block-heading">Benefits of preconnect and prefetch</h2>



<p>There is a performance cost when you use content hosted on a domain outside of your main domain.</p>



<p>The browser has to go through a multi-step process to connect to that external domain, which takes time. If you use assets from several other domains, the impact is amplified further.</p>



<p>Per Google&#8217;s documentation:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>Establishing connections often involves significant time in slow networks, particularly when it comes to secure connections, as it may involve DNS lookups, redirects, and several round trips to the final server that handles the user&#8217;s request.</p>
<cite>https://developer.chrome.com/docs/lighthouse/performance/uses-rel-preconnect</cite></blockquote>



<p>Using <code>preconnect</code> or <code>prefetch</code> gets that process started earlier, so that downloading the actual file will be quicker when it&#8217;s time to do that. It&#8217;s like unlocking the door of your house so your visitor can walk right in when they arrive. </p>



<p>Examples of content commonly fetched from 3rd parties include social media widgets, ad scripts from networks like Google Adsense and Mediavine, streaming videos etc</p>



<p>I would classify preconnecting and prefetching as micro-optimizations. </p>



<p>That is, it&#8217;s a best practice to use these hints, but you won&#8217;t notice a huge difference in performance or loading time. This change alone will not really impact the overall PageSpeed score.</p>



<p>For that reason, resource hints are not the first step to take when optimizing your page (<a href="https://webtrainingwheels.com/remove-unused-javascript-in-wordpress/" data-type="post" data-id="4925">managing your JavaScript</a> and <a href="https://webtrainingwheels.com/reduce-unused-css-wordpress/" data-type="post" data-id="5968">reducing unused CSS</a> are better places to start). But, they are pretty easy to implement, so you may as well utilize them.</p>



<h2 class="wp-block-heading">What&#8217;s the difference between preconnect and prefetch?</h2>



<p>DNS prefetch performs the DNS lookup only, whereas preconnect also performs the next couple of steps in the process. </p>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2023/12/preconnect-vs-dns-prefetch.jpg"><img decoding="async" src="https://webtrainingwheels.com/wp-content/uploads/2023/12/preconnect-vs-dns-prefetch-1024x134.jpg" alt="" class="wp-image-6115"/></a></figure>



<p>This makes preconnect a bit more expensive to use and should be used sparingly.</p>



<p>DNS prefetch can be used more liberally.</p>



<h2 class="wp-block-heading">Which domains should you preconnect to?</h2>



<p>Running a Lighthouse or PageSpeed report will inform you about domains you could consider preconnecting to.</p>



<figure class="wp-block-image size-large"><img decoding="async" src="https://webtrainingwheels.com/wp-content/uploads/2023/12/lighthouse-preconnect-to-required-origins2-1024x403.jpg" alt="" class="wp-image-6116"/></figure>



<p>You could also run a GT Metrix report, go the Waterfall tab, check the Domain column and look for domains listed there which are not yours.</p>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2023/12/gtmetrix-domains.jpg"><img decoding="async" src="https://webtrainingwheels.com/wp-content/uploads/2023/12/gtmetrix-domains-1024x658.jpg" alt="" class="wp-image-6117"/></a></figure>



<p>Even if the recommendation is not showing up in PageSpeed, it&#8217;s worth scrolling to the &#8220;Passed&#8221; section to make sure you aren&#8217;t using it incorrectly. There it will show warnings for unnecessary preconnects:</p>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2023/12/pagespeed-preconnect-warnings.jpg"><img decoding="async" src="https://webtrainingwheels.com/wp-content/uploads/2023/12/pagespeed-preconnect-warnings-1024x531.jpg" alt="" class="wp-image-6118"/></a></figure>



<p>There are 2 guidelines to keep in mind, according to PageSpeed: </p>



<ul class="wp-block-list">
<li>Don&#8217;t preconnect to more than 2 domains.</li>



<li>Preconnects should only be for resources definitely used within 10 seconds, otherwise the connection is closed and it was essentially a waste.</li>
</ul>



<p>So your strategy should be: </p>



<p><strong>Use preconnect for the 2 most important external resources and prefetch for the rest.</strong></p>



<ul class="wp-block-list">
<li>&#8220;Most important&#8221; is defined as what&#8217;s more critical to the display of your webpage. If you have a social widget or externally hosted streaming video above the fold, you&#8217;d want to preconnect that. </li>



<li>If you are unsure, DNS prefetch is the safer choice.</li>
</ul>



<p></p>



<h2 class="wp-block-heading">How to add Preconnect and DNS Prefetch on your site</h2>



<p>It&#8217;s possible some browser hints are being automatically added to your site by WordPress itself, or by themes and plugins:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>By default, wp_resource_hints() prints hints for s.w.org (the WordPress.org CDN) and for all scripts and styles which are enqueued from external hosts.</p>
<cite>https://make.wordpress.org/core/2016/07/06/resource-hints-in-4-6/</cite></blockquote>



<p>So it would be a good idea to check the HTML of your site to see if that&#8217;s the case. </p>



<ol class="wp-block-list">
<li>Go to <em>View Page Source</em> in your browser</li>



<li>Search for <code>preconnect</code> and then <code>dns-prefetch</code></li>
</ol>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2024/01/page-source.jpg"><img decoding="async" width="1024" height="170" src="https://webtrainingwheels.com/wp-content/uploads/2024/01/page-source-1024x170.jpg" alt="" class="wp-image-6128" srcset="https://webtrainingwheels.com/wp-content/uploads/2024/01/page-source-1024x170.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2024/01/page-source-500x83.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2024/01/page-source-768x128.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2024/01/page-source-1536x255.jpg 1536w, https://webtrainingwheels.com/wp-content/uploads/2024/01/page-source-2048x340.jpg 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>Besides that, several optimization plugins allow you to add these browser hints, or you can manually add them yourself.</p>



<h3 class="wp-block-heading">Should you use &#8220;crossorigin&#8221;?</h3>



<p>You will see in some cases the ability to add <code>crossorigin</code> to the <code>preconnect</code> directive. Whether to use it or no can be a bit confusing. If the resource that will be used requires CORS, which webfonts do, then <code>crossorigin</code> should be used. </p>



<p>For more info, please read: &#8220;<a href="https://crenshaw.dev/preconnect-resource-hint-crossorigin-attribute/" data-type="link" data-id="https://crenshaw.dev/preconnect-resource-hint-crossorigin-attribute/">preconnect resource hint and the crossorigin attribute</a>&#8220;</p>



<h3 class="wp-block-heading">WP Rocket</h3>



<p><a href="https://wp-rocket.me">WP Rocket</a> is a premium-only caching and optimization plugin. It automatically added browser hints in some cases:</p>



<ul class="wp-block-list">
<li>If you have enabled the CDN function, a <code>preconnect</code> (with <code>prefetch</code> fallback) is automatically added for your CDN domain.</li>



<li><code>Preconnect</code> for Google Fonts is handled automatically</li>
</ul>



<p>You can manually add <code>dns-prefetch</code> hints:</p>



<ol class="wp-block-list">
<li>Go to the <em>Preload</em> tab and scroll down to <em>Prefetch DNS Requests</em></li>



<li>Enter the domain without the protocol, like this: <br><code>//example.com</code></li>



<li>Save the settings</li>
</ol>



<figure class="wp-block-image size-medium"><img decoding="async" width="500" height="308" src="https://webtrainingwheels.com/wp-content/uploads/2023/12/WP-Rocket-DNS-Prefetch-500x308.jpg" alt="" class="wp-image-6123" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/12/WP-Rocket-DNS-Prefetch-500x308.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2023/12/WP-Rocket-DNS-Prefetch-1024x630.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2023/12/WP-Rocket-DNS-Prefetch-768x473.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2023/12/WP-Rocket-DNS-Prefetch.jpg 1144w" sizes="(max-width: 500px) 100vw, 500px" /></figure>



<h3 class="wp-block-heading">Perfmatters</h3>



<p><a href="https://perfmatters.io">Perfmatters</a> is a premium-only optimization plugin (no caching) which offers options for both <code>prefetch</code> and <code>preconnect</code>.</p>



<ol class="wp-block-list">
<li>Go to <em>Settings → Perfmatters → Preloading</em></li>



<li>There are fields for both Preconnect and DNS Prefetch</li>



<li>For Preconnect enter the domain name including the protocol. For DNS Prefetch enter only the domain preceded by <code>//</code>:</li>
</ol>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="380" src="https://webtrainingwheels.com/wp-content/uploads/2023/12/perfmatters-prefetch-preconnect-1024x380.jpg" alt="" class="wp-image-6124" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/12/perfmatters-prefetch-preconnect-1024x380.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2023/12/perfmatters-prefetch-preconnect-500x186.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2023/12/perfmatters-prefetch-preconnect-768x285.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2023/12/perfmatters-prefetch-preconnect-1536x570.jpg 1536w, https://webtrainingwheels.com/wp-content/uploads/2023/12/perfmatters-prefetch-preconnect.jpg 1670w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h3 class="wp-block-heading">Pre* Party Resource Hints plugin</h3>



<p><a href="https://wordpress.org/plugins/pre-party-browser-hints/" data-type="link" data-id="https://wordpress.org/plugins/pre-party-browser-hints/">Pre Party Resource Hints is a free plugin</a> available on WordPress.org.  This could be useful if you&#8217;re not already using another optimization plugin. </p>



<p>You can use it to add other resource hints like <code>preload</code> and <code>prerender</code> in addition to <code>prefetch</code> and <code>preconnect</code>.</p>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2024/01/pre-party-settings.jpg"><img decoding="async" width="1024" height="546" src="https://webtrainingwheels.com/wp-content/uploads/2024/01/pre-party-settings-1024x546.jpg" alt="" class="wp-image-6136" srcset="https://webtrainingwheels.com/wp-content/uploads/2024/01/pre-party-settings-1024x546.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2024/01/pre-party-settings-500x266.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2024/01/pre-party-settings-768x409.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2024/01/pre-party-settings-1536x819.jpg 1536w, https://webtrainingwheels.com/wp-content/uploads/2024/01/pre-party-settings-2048x1091.jpg 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>It also has a very useful feature to automatically preconnect external resources it detects: </p>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2024/01/auto-preconnect.jpg"><img decoding="async" width="1024" height="170" src="https://webtrainingwheels.com/wp-content/uploads/2024/01/auto-preconnect-1024x170.jpg" alt="" class="wp-image-6133" srcset="https://webtrainingwheels.com/wp-content/uploads/2024/01/auto-preconnect-1024x170.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2024/01/auto-preconnect-500x83.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2024/01/auto-preconnect-768x128.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2024/01/auto-preconnect-1536x255.jpg 1536w, https://webtrainingwheels.com/wp-content/uploads/2024/01/auto-preconnect-2048x340.jpg 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p><br>Due to the slightly more advanced settings, I&#8217;d only recommend this plugin for intermediate/advanced site owners. </p>



<h3 class="wp-block-heading">Add prefetch and preconnect manually</h3>



<p>If you want to add the code yourself, you can install a plugin like <a href="https://wordpress.org/plugins/wp-headers-and-footers/">WP Headers and Footers</a> and use the <em>Scripts in Header</em> field to add it. </p>


<div class="wp-block-image">
<figure class="aligncenter size-medium"><a href="https://webtrainingwheels.com/wp-content/uploads/2024/01/wp-headers-and-footers.jpg"><img decoding="async" width="500" height="296" src="https://webtrainingwheels.com/wp-content/uploads/2024/01/wp-headers-and-footers-500x296.jpg" alt="" class="wp-image-6157" srcset="https://webtrainingwheels.com/wp-content/uploads/2024/01/wp-headers-and-footers-500x296.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2024/01/wp-headers-and-footers-1024x606.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2024/01/wp-headers-and-footers-768x455.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2024/01/wp-headers-and-footers-1536x909.jpg 1536w, https://webtrainingwheels.com/wp-content/uploads/2024/01/wp-headers-and-footers.jpg 1730w" sizes="(max-width: 500px) 100vw, 500px" /></a></figure></div>


<p>Here are the elements you have to include:</p>



<ol class="wp-block-list">
<li>Open the tag with &lt;link</li>



<li>Specify the type of hint with <code>rel=</code> and then either <code>dns-prefetch</code> or <code>preconnect</code>, e,g,: <code>rel='dns-prefetch'</code></li>



<li>Use <code>href=</code> to specify the domain. Use the full domain including http or https for preconnect. For prefetch remove http and use the format: <code>//domain.com</code> <br>For example: <code>href='//fonts.googleapis.com'</code></li>



<li>Close the tag with <code>/&gt;</code></li>
</ol>



<p>Here&#8217;s an example of a DNS Prefetch:</p>


<pre class="wp-block-code"><span><code class="hljs language-xml"><span class="hljs-tag">&lt;<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">'dns-prefetch'</span> <span class="hljs-attr">href</span>=<span class="hljs-string">'//fonts.googleapis.com'</span> /&gt;</span></code></span></pre>


<p>And an example of a <code>preconnect</code>:</p>


<pre class="wp-block-code"><span><code class="hljs language-xml"><span class="hljs-tag">&lt;<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"preconnect"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://fonts.gstatic.com"</span> <span class="hljs-attr">crossorigin</span>&gt;</span></code></span></pre>


<p>Notes: </p>



<ul class="wp-block-list">
<li>You will see either double quotes or single quotes used in examples across the web. Either way is fine. </li>



<li>The <code>rel</code> can appear at the start or end of the tag, it doesn&#8217;t matter. Both the following are valid: </li>
</ul>


<pre class="wp-block-code"><span><code class="hljs language-xml"><span class="hljs-tag">&lt;<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">'preconnect'</span> <span class="hljs-attr">href</span>=<span class="hljs-string">'https://wikipedia.org'</span> &gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">link</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://google.com"</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"preconnect"</span>&gt;</span></code></span></pre>


<h3 class="wp-block-heading">How to check if your hints are working</h3>



<p>In Safari, the Console outputs messages to let you know if the hints are successful: </p>



<figure class="wp-block-image size-medium"><img decoding="async" width="500" height="315" src="https://webtrainingwheels.com/wp-content/uploads/2024/01/safari-console-500x315.jpg" alt="" class="wp-image-6137" srcset="https://webtrainingwheels.com/wp-content/uploads/2024/01/safari-console-500x315.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2024/01/safari-console-768x484.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2024/01/safari-console.jpg 920w" sizes="(max-width: 500px) 100vw, 500px" /></figure>



<p>You can also use a tool like WebPageTest.org which shows you a Connection view. Here you should be able to see the download of the hinted asset occurring in 2 parts. </p>



<ol class="wp-block-list">
<li>The preconnect/prefetch phase which should happen early</li>



<li>The downloading phase a little later, when the file is actually used.</li>
</ol>



<p>Look at line 6 below. The first part of the connection and SSL negotiation happens early in the process, then there is a gap until the file is actually needed and downloaded. </p>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2024/01/webpagetest-connnectionview.jpg"><img decoding="async" width="1024" height="361" src="https://webtrainingwheels.com/wp-content/uploads/2024/01/webpagetest-connnectionview-1024x361.jpg" alt="" class="wp-image-6141" srcset="https://webtrainingwheels.com/wp-content/uploads/2024/01/webpagetest-connnectionview-1024x361.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2024/01/webpagetest-connnectionview-500x176.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2024/01/webpagetest-connnectionview-768x271.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2024/01/webpagetest-connnectionview-1536x542.jpg 1536w, https://webtrainingwheels.com/wp-content/uploads/2024/01/webpagetest-connnectionview-2048x723.jpg 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>If you are just getting started with optimzing your page, I&#8217;d recommend handling these higher priority recommendations first: <a href="https://webtrainingwheels.com/reduce-unused-css-wordpress/" data-type="post" data-id="5968">Reduce Unused CSS in WordPress</a>, <a href="https://webtrainingwheels.com/remove-unused-javascript-in-wordpress/" data-type="post" data-id="4925">Reduce unused JavaScript in WordPress</a>, <a href="https://webtrainingwheels.com/how-to-avoid-enormous-network-payloads-in-wordpress/" data-type="post" data-id="4786">How to avoid enormous network payloads in WordPress</a>.</p><div id="webtr-3849738315" class="webtr-content">
                <div class='gf_browser_unknown gform_wrapper gform_legacy_markup_wrapper gform-theme--no-framework' data-form-theme='legacy' data-form-index='0' id='gform_wrapper_32' >
                        <div class='gform_heading'>
                            <h3 class="gform_title">Weekly WordPress Tips To Your Inbox</h3>
                        </div><form method='post' enctype='multipart/form-data'  id='gform_32'  action='/feed/' data-formid='32' novalidate> 
 <input type='hidden' class='gforms-pum' value='{"closepopup":false,"closedelay":0,"openpopup":false,"openpopup_id":0}' />
                        <div class='gform-body gform_body'><ul id='gform_fields_32' class='gform_fields top_label form_sublabel_below description_below validation_below'><li id="field_32_3" class="gfield gfield--type-honeypot gform_validation_container field_sublabel_below gfield--has-description field_description_below field_validation_below gfield_visibility_visible"  ><label class='gfield_label gform-field-label' for='input_32_3'>X/Twitter</label><div class='ginput_container'><input name='input_3' id='input_32_3' type='text' value='' autocomplete='new-password'/></div><div class='gfield_description' id='gfield_description_32_3'>This field is for validation purposes and should be left unchanged.</div></li><li id="field_32_1" class="gfield gfield--type-email gfield_contains_required field_sublabel_below gfield--no-description field_description_below field_validation_below gfield_visibility_visible"  ><label class='gfield_label gform-field-label screen-reader-text' for='input_32_1'>Enter Your Email, It&#039;s Free!<span class="gfield_required"><span class="gfield_required gfield_required_asterisk">*</span></span></label><div class='ginput_container ginput_container_email'>
                            <input name='input_1' id='input_32_1' type='email' value='' class='large'   placeholder='Enter Your Email, It&#039;s Free!' aria-required="true" aria-invalid="false"  />
                        </div></li><li id="field_32_2" class="gfield gfield--type-hidden gform_hidden field_sublabel_below gfield--no-description field_description_below field_validation_below gfield_visibility_visible"  ><div class='ginput_container ginput_container_text'><input name='input_2' id='input_32_2' type='hidden' class='gform_hidden'  aria-invalid="false" value='http://webtrainingwheels.com/feed/' /></div></li></ul></div>
        <div class='gform-footer gform_footer top_label'> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body><div class="gf-turnstile-container"> <div id="cf-turnstile-gf-32" class="cf-turnstile" data-callback="turnstileGravityCallback" data-sitekey="0x4AAAAAAA7A0N4QhHj7cf1O" data-theme="light" data-language="auto" data-size="normal" data-retry="auto" data-retry-interval="1000" data-refresh-expired="auto" data-action="gravity-form-32" data-appearance="always"></div> <style>.gform_button { pointer-events: none; opacity: 0.5; }</style> <script>document.addEventListener("DOMContentLoaded", function() { setTimeout(function(){ var e=document.getElementById("cf-turnstile-gf-32"); e&&!e.innerHTML.trim()&&(turnstile.remove("#cf-turnstile-gf-32"), turnstile.render("#cf-turnstile-gf-32", {sitekey:"0x4AAAAAAA7A0N4QhHj7cf1O"})); }, 100); });</script> <br class="cf-turnstile-br cf-turnstile-br-gf-32"> <style>#cf-turnstile-gf-32 { margin-left: -15px; }</style> </div> <style> .gf-turnstile-container { width: 100%; } .gform_footer.top_label { display: flex; flex-wrap: wrap; } </style> <script>document.addEventListener("DOMContentLoaded", function() {document.addEventListener('gform/post_render', function handlePostRender(event) {if (event.detail.formId !== 32) {return;}gform.utils.addAsyncFilter('gform/submission/pre_submission', async function handlePreSubmission(data) {document.addEventListener('gform/post_render', function rerenderTurnstile(event) {if (event.detail.formId !== 32) {return;}const turnstileElement = document.getElementById('cf-turnstile-gf-32');if (turnstileElement) {turnstile.remove('#cf-turnstile-gf-32');turnstile.render('#cf-turnstile-gf-32');}document.removeEventListener('gform/post_render', rerenderTurnstile);});gform.utils.removeFilter('gform/submission/pre_submission', handlePreSubmission);return data;});document.removeEventListener('gform/post_render', handlePostRender);});});</script><input type="submit" id="gform_submit_button_32" class="gform_button button" onclick="__gaTracker('send', 'event', { eventCategory: 'Forms', eventAction: 'Subscribe', eventLabel: 'PostFooter'});gform.submission.handleButtonClick(this);" data-submission-type="submit" value="Sign Up"></body></html>
 
            <input type='hidden' class='gform_hidden' name='gform_submission_method' data-js='gform_submission_method_32' value='postback' />
            <input type='hidden' class='gform_hidden' name='gform_theme' data-js='gform_theme_32' id='gform_theme_32' value='legacy' />
            <input type='hidden' class='gform_hidden' name='gform_style_settings' data-js='gform_style_settings_32' id='gform_style_settings_32' value='[]' />
            <input type='hidden' class='gform_hidden' name='is_submit_32' value='1' />
            <input type='hidden' class='gform_hidden' name='gform_submit' value='32' />
            
            <input type='hidden' class='gform_hidden' name='gform_currency' data-currency='USD' value='x57aMwEzZ4/mvu3iAuvQydeZjRNGSl2HFxomiXcn5yye6KafVJCAfgiwZ2nfUVit7wJ3c2Osiaue1MDb72zbP7HMGqYcysOQ9MwLbRuEVb7NO/M=' />
            <input type='hidden' class='gform_hidden' name='gform_unique_id' value='' />
            <input type='hidden' class='gform_hidden' name='state_32' value='WyJbXSIsIjNhZjRhZTc2ODU5NzRiOTg2YjVjODkwMzk3M2ZhNTE5Il0=' />
            <input type='hidden' autocomplete='off' class='gform_hidden' name='gform_target_page_number_32' id='gform_target_page_number_32' value='0' />
            <input type='hidden' autocomplete='off' class='gform_hidden' name='gform_source_page_number_32' id='gform_source_page_number_32' value='1' />
            <input type='hidden' name='gform_field_values' value='' />
            
        </div>
                        </form>
                        </div><script>
gform.initializeOnLoaded( function() {gformInitSpinner( 32, 'http://webtrainingwheels.com/wp-content/plugins/gravityforms/images/spinner.svg', true );jQuery('#gform_ajax_frame_32').on('load',function(){var contents = jQuery(this).contents().find('*').html();var is_postback = contents.indexOf('GF_AJAX_POSTBACK') >= 0;if(!is_postback){return;}var form_content = jQuery(this).contents().find('#gform_wrapper_32');var is_confirmation = jQuery(this).contents().find('#gform_confirmation_wrapper_32').length > 0;var is_redirect = contents.indexOf('gformRedirect(){') >= 0;var is_form = form_content.length > 0 && ! is_redirect && ! is_confirmation;var mt = parseInt(jQuery('html').css('margin-top'), 10) + parseInt(jQuery('body').css('margin-top'), 10) + 100;if(is_form){jQuery('#gform_wrapper_32').html(form_content.html());if(form_content.hasClass('gform_validation_error')){jQuery('#gform_wrapper_32').addClass('gform_validation_error');} else {jQuery('#gform_wrapper_32').removeClass('gform_validation_error');}setTimeout( function() { /* delay the scroll by 50 milliseconds to fix a bug in chrome */  }, 50 );if(window['gformInitDatepicker']) {gformInitDatepicker();}if(window['gformInitPriceFields']) {gformInitPriceFields();}var current_page = jQuery('#gform_source_page_number_32').val();gformInitSpinner( 32, 'http://webtrainingwheels.com/wp-content/plugins/gravityforms/images/spinner.svg', true );jQuery(document).trigger('gform_page_loaded', [32, current_page]);window['gf_submitting_32'] = false;}else if(!is_redirect){var confirmation_content = jQuery(this).contents().find('.GF_AJAX_POSTBACK').html();if(!confirmation_content){confirmation_content = contents;}jQuery('#gform_wrapper_32').replaceWith(confirmation_content);jQuery(document).trigger('gform_confirmation_loaded', [32]);window['gf_submitting_32'] = false;wp.a11y.speak(jQuery('#gform_confirmation_message_32').text());}else{jQuery('#gform_32').append(contents);if(window['gformRedirect']) {gformRedirect();}}jQuery(document).trigger("gform_pre_post_render", [{ formId: "32", currentPage: "current_page", abort: function() { this.preventDefault(); } }]);        if (event && event.defaultPrevented) {                return;        }        const gformWrapperDiv = document.getElementById( "gform_wrapper_32" );        if ( gformWrapperDiv ) {            const visibilitySpan = document.createElement( "span" );            visibilitySpan.id = "gform_visibility_test_32";            gformWrapperDiv.insertAdjacentElement( "afterend", visibilitySpan );        }        const visibilityTestDiv = document.getElementById( "gform_visibility_test_32" );        let postRenderFired = false;        function triggerPostRender() {            if ( postRenderFired ) {                return;            }            postRenderFired = true;            gform.core.triggerPostRenderEvents( 32, current_page );            if ( visibilityTestDiv ) {                visibilityTestDiv.parentNode.removeChild( visibilityTestDiv );            }        }        function debounce( func, wait, immediate ) {            var timeout;            return function() {                var context = this, args = arguments;                var later = function() {                    timeout = null;                    if ( !immediate ) func.apply( context, args );                };                var callNow = immediate && !timeout;                clearTimeout( timeout );                timeout = setTimeout( later, wait );                if ( callNow ) func.apply( context, args );            };        }        const debouncedTriggerPostRender = debounce( function() {            triggerPostRender();        }, 200 );        if ( visibilityTestDiv && visibilityTestDiv.offsetParent === null ) {            const observer = new MutationObserver( ( mutations ) => {                mutations.forEach( ( mutation ) => {                    if ( mutation.type === 'attributes' && visibilityTestDiv.offsetParent !== null ) {                        debouncedTriggerPostRender();                        observer.disconnect();                    }                });            });            observer.observe( document.body, {                attributes: true,                childList: false,                subtree: true,                attributeFilter: [ 'style', 'class' ],            });        } else {            triggerPostRender();        }    } );} );
</script>
</div>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Browser Caching in WordPress</title>
		<link>https://webtrainingwheels.com/browser-caching-wordpress/</link>
		
		<dc:creator><![CDATA[Lucy]]></dc:creator>
		<pubDate>Tue, 21 Nov 2023 20:32:48 +0000</pubDate>
				<category><![CDATA[Speed Optimization]]></category>
		<guid isPermaLink="false">https://webtrainingwheels.com/?p=6054</guid>

					<description><![CDATA[Implementing browser caching on your WordPress website improves performance for visitors who visit multiple pages or visit your website multiple times. It allows their computer to store commonly used files in their browser which means pages can be displayed faster on those repeat visits. Browser caching vs page caching You may have heard about page ... <p class="read-more-container"><a title="Browser Caching in WordPress" class="read-more button" href="https://webtrainingwheels.com/browser-caching-wordpress/#more-6054" aria-label="Read more about Browser Caching in WordPress">Read more</a></p>]]></description>
										<content:encoded><![CDATA[<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" width="620" height="250" src="https://webtrainingwheels.com/wp-content/uploads/2023/11/efficient-cache-policy-620x250-1.jpg" alt="" class="wp-image-6087" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/11/efficient-cache-policy-620x250-1.jpg 620w, https://webtrainingwheels.com/wp-content/uploads/2023/11/efficient-cache-policy-620x250-1-500x202.jpg 500w" sizes="(max-width: 620px) 100vw, 620px" /></figure></div>


<p><strong>Implementing browser caching on your WordPress website improves performance for visitors who visit multiple pages or visit your website multiple times. </strong></p>



<p>It allows their computer to store commonly used files in their browser which means pages can be displayed faster on those repeat visits.</p>



<span id="more-6054"></span>






<h2 class="wp-block-heading">Browser caching vs page caching</h2>



<p>You may have heard about page caching already. This is related to, but not the same as, browser caching. </p>



<p>Caching is the process of “remembering” information for fast retrieval.</p>



<p>Both page caching and browser caching are methods for remembering information, but they store the information in different places.</p>



<p>Page caching happens on your server, while browser caching happens, yes, in the browser. Specifically, in the browser of each visitor and on each device that they access your site from. </p>



<p>And just to clarify, by browser I mean the program or app you use to look at webpages, e.g. Safari, Chrome, Internet Explorer, Firefox etc</p>



<h2 class="wp-block-heading">Let’s Cook Up A Webpage!</h2>



<p>We can imagine browser caching in terms of making a meal. In this case, the “meal” is the webpage that you want to look at, and all the files used on that page are the “ingredients”. </p>



<p>Before you can make a meal, you have to check that you have all the right ingredients, and that they are fresh. You then combine all those ingredients in a specific way to create the meal.</p>



<p>If this is the first time you’re making this particular meal, you probably don’t have all the ingredients on-hand in your kitchen. So you’ll have to go to the store and buy them – this will of course take some extra time.</p>



<p>Now let’s say you want to have that same meal again tomorrow. This time, because you already have most or all of the ingredients in your kitchen, you can prepare the meal much faster.</p>


<hr /><p><em>Browser caching makes &#039;cooking up&#039; a webpage faster on repeat visits</em><br /><a href='https://twitter.com/intent/tweet?url=https%3A%2F%2Fwebtrainingwheels.com%2Fbrowser-caching-wordpress%2F&#038;text=Browser%20caching%20makes%20%27cooking%20up%27%20a%20webpage%20faster%20on%20repeat%20visits&#038;related' target='_blank' rel="noopener noreferrer" >Share on X</a><br /><hr />


<p> In our analogy, you use your browser to request a certain webpage – a specific meal. </p>



<p>The browser contacts the server where that webpage lives, it asks for the recipe for that page, and gets sent the list of ingredients. These ingredients are basically, HTML, CSS, JavaScript and image files. </p>



<p>If it’s the first time you’ve gone to this webpage, your browser won’t have any of the ingredients on hand so it has to “go shopping” and retrieve them all fresh from the server.</p>



<p>But when you visit that same webpage again, your browser doesn’t have to reassemble everything from scratch, it can use the ingredients it’s already stored, and only ask the server for the new things it doesn’t have.</p>



<p>So that’s why, the first time you visit a webpage it takes longer than the following visits.</p>



<p>You may have noticed this phenomenon when you do repeated speed tests, or when you use the “repeat view” on webpagetest.org. The repeat view is always faster because many of the components have already been downloaded and don’t have to be fetched fresh.</p>



<p>The&nbsp; point of browser caching is to make repeat views of a webpage more efficient.</p>



<h3 class="wp-block-heading"><strong>Ingredients in your kitchen go stale though, don’t they?</strong></h3>



<p>They sure do, and so do the ingredients of your webpage. In terms of a webpage, “stale” means that you’ve updated something, making the cached version out-of-date. </p>



<p>Just like food, webpage ingredients must also have an expiration date so the browser knows whether to use them, or whether to get a fresh version, when cooking up the webpage.</p>



<p>When the browser gets the list of ingredients from the server, each file has a “header”. This is just some information about that file, including how long it can be considered fresh for. </p>



<p>This can be communicated either by a <code>cache-control</code> header set in seconds, or an <code>expires</code> header using a specific length of time. You can see both, as they appear in the browser, below:</p>



<figure class="wp-block-image size-medium"><img decoding="async" width="500" height="249" src="https://webtrainingwheels.com/wp-content/uploads/2023/11/cache-control-vs-expires-500x249.jpg" alt="" class="wp-image-6035" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/11/cache-control-vs-expires-500x249.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2023/11/cache-control-vs-expires-768x382.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2023/11/cache-control-vs-expires.jpg 980w" sizes="(max-width: 500px) 100vw, 500px" /></figure>



<p>This is like checking the “sell by” or “expiration” date on your ingredients. That expiration will vary according to the type of file. The goal is to keep ingredients fresh as long as possible, to avoid those time-expensive shopping trips.</p>



<p>So the browser checks the expiration for the ingredients list, and then checks it’s kitchen (browser cache) to see if what’s there is stale or not. If the expiration date has not passed, the browser doesn’t need to download that ingredient, it just uses the one it already has, which is much faster.</p>


<hr /><p><em>Browser caching adds &#039;sell by&#039; dates to website files for efficiency &amp; freshness</em><br /><a href='https://twitter.com/intent/tweet?url=https%3A%2F%2Fwebtrainingwheels.com%2Fbrowser-caching-wordpress%2F&#038;text=Browser%20caching%20adds%20%27sell%20by%27%20dates%20to%20website%20files%20for%20efficiency%20%26%20freshness&#038;related' target='_blank' rel="noopener noreferrer" >Share on X</a><br /><hr />


<p>Sometimes in Google PageSpeed or other tools, you get this recommendation:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p><strong>“</strong>Serve static assets with an efficient cache policy<strong>”</strong></p>
</blockquote>



<p>What this is saying is that, these ingredients had a short shelf-life, they go stale quickly so you’ll have to shop for them frequently and that’s inefficient.</p>



<p>So generally, it’s a good idea to have a far expiration date so that your browser doesn’t have to do the equivalent of run out to the store all the time for a new version of that file.</p>



<p class="callout">Read our guide on <a href="https://webtrainingwheels.com/serve-static-assets-efficient-cache-policy-wordpress" data-type="link" data-id="https://webtrainingwheels.com/serve-static-assets-efficient-cache-policy-wordpress">how to enable browser caching in WordPress</a>.</p>



<p><strong>What if I change a file and the browser cache rule hasn&#8217;t expired yet?</strong></p>



<p>Very valid question! There is a mechanism for this process of letting the browser know &#8220;hey, you may have cached this file but I need you to fetch it again.&#8221; This is called &#8220;busting&#8221; the browser cache. </p>



<p>The browser can&#8217;t check the contents of the file to see if it&#8217;s different than the contents of the file it already has in its cache. But if it detects a different filename, it will assume the file is new and download it again. </p>



<p>On the website side, we can use query strings for this. You have probably seen file URLs like this: </p>



<p><code>https://example.com/wp-content/themes/astra-child/style.css?ver=4.0.3</code></p>



<p>The part at the end, after the <code>?</code>, is called the query string. </p>



<p>By changing the query string, the browser will understand that this <code>style.css</code> file has been changed, and will therefore download the new version of it, even if the value of the browser cache rule hasn&#8217;t yet been met. </p>



<p>In this way, you can make sure that all new code changes are pushed out to all visitors and won&#8217;t depend upon visitors clearing their own browser cache.</p>



<h2 class="wp-block-heading">How to disable browser caching in WordPress</h2>



<p><strong>Themes and plugins</strong></p>



<p>You shouldn&#8217;t need to disable any browser caching in WordPress if the plugins you&#8217;re using are following best practices, or if you as a developer are doing so. </p>



<p>The issue people can have is that they make a change to, let&#8217;s say a CSS file, but they don&#8217;t see it reflected on the site because the old version is cached in their browser. </p>



<p>This will only happen if you haven&#8217;t correctly versioned your files. That means appending a query string which changes when you update the file. </p>



<p>For example, you change <code>style.css?ver=1</code> to <code>style.css?ver=2</code></p>



<p>It actually doesn&#8217;t matter what comes after the ?<br>The query string can be anything, as long as it&#8217;s different than before.</p>



<p>By doing that you are &#8220;busting the browser cache.&#8221; That means that the browser will recognize this is a new file and download again, letting you see your changes. If you continue to use the exact same file name the browser will not understand that there is new content, so it won&#8217;t download it again.</p>



<p>WordPress themes and plugins have this in place and most often the query strings are the version number which updates when the theme/plugin updates. </p>



<p>If you are creating your own custom theme make sure you edit the theme version number in your <code>style.css</code> when you make an update:</p>



<figure class="wp-block-image size-medium"><img decoding="async" width="500" height="257" src="https://webtrainingwheels.com/wp-content/uploads/2023/11/child-theme-version-500x257.jpg" alt="" class="wp-image-6076" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/11/child-theme-version-500x257.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2023/11/child-theme-version.jpg 746w" sizes="(max-width: 500px) 100vw, 500px" /></figure>



<p>This will change the query string on the files, and all your changes will be available. </p>



<p>If for some reason you can&#8217;t get that to work, you could try the <a href="https://wordpress.org/plugins/cachebuster/">Cachebuster plugin</a>. This is a very simple plugin that adds the file modification time as a query string to CSS and JS files. When the file is updated the query string will change, updating the cache of all site visitors.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="936" height="72" src="https://webtrainingwheels.com/wp-content/uploads/2023/11/cachebuster-plugin.jpg" alt="" class="wp-image-6096" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/11/cachebuster-plugin.jpg 936w, https://webtrainingwheels.com/wp-content/uploads/2023/11/cachebuster-plugin-500x38.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2023/11/cachebuster-plugin-768x59.jpg 768w" sizes="(max-width: 936px) 100vw, 936px" /></figure>



<p><strong>Media files</strong></p>



<p>Other files which could be browser cached are media files like images and pdfs. This can be trickier because they don&#8217;t have any query strings to version them, by default, and there isn&#8217;t a simple WordPress way to add and change them automatically.</p>



<p>In most cases you don&#8217;t update these kinds of files often. But if you need to update a file and don&#8217;t change the filename, you will run into a problem.</p>



<p>There is no great way to handle this in WordPress, to be honest. </p>



<p>Some people want to disable browser caching entirely for these file types by adding something like the following to their htaccess file: </p>


<pre class="wp-block-code"><span><code class="hljs language-xml"><span class="hljs-tag">&lt;<span class="hljs-name">FilesMatch</span> "\<span class="hljs-attr">.</span>(<span class="hljs-attr">gif</span>|<span class="hljs-attr">jpe</span>?<span class="hljs-attr">g</span>|<span class="hljs-attr">png</span>|<span class="hljs-attr">webp</span>)$"&gt;</span> 
<span class="hljs-tag">&lt;<span class="hljs-name">IfModule</span> <span class="hljs-attr">mod_headers.c</span>&gt;</span> 
Header set Cache-Control "no-cache, no-store, must-revalidate, max-age=0" 
<span class="hljs-tag">&lt;/<span class="hljs-name">IfModule</span>&gt;</span> 
<span class="hljs-tag">&lt;/<span class="hljs-name">FilesMatch</span>&gt;</span></code></span></pre>


<p>However, that&#8217;s disabling browser caching for all those filetypes which is overkill in my opinion.</p>



<p>You could use a more specific rule to target a specific file, like this:</p>


<pre class="wp-block-code"><span><code class="hljs language-php">&lt;IfModule mod_headers.c&gt;
&lt;FilesMatch <span class="hljs-string">"image.jpg"</span>&gt;
FileETag None
Header <span class="hljs-keyword">unset</span> ETag
Header set Cache-Control <span class="hljs-string">"max-age=0, no-cache, no-store, must-revalidate"</span>
Header set Pragma <span class="hljs-string">"no-cache"</span>
Header set Expires <span class="hljs-string">"Wed, 11 Jan 1984 05:00:00 GMT"</span>
&lt;/FilesMatch&gt;
&lt;/IfModule&gt;</code></span></pre>


<p>In the second line replace <code>image.jpg</code> with the filename you want to keep updated.</p>



<p>That&#8217;s still not ideal because there will be no browser caching for that file. </p>



<p>The best workaround would be to modify the filename. </p>



<p>In that case you would have to make sure you also update any links that point to it, to avoid a broken link. You can use the <a href="https://wordpress.org/plugins/enable-media-replace/" data-type="link" data-id="https://wordpress.org/plugins/enable-media-replace/">Enable Media Replace</a> plugin to help with that. </p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="661" src="https://webtrainingwheels.com/wp-content/uploads/2023/11/enable-media-replace-1024x661.jpg" alt="" class="wp-image-6097" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/11/enable-media-replace-1024x661.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2023/11/enable-media-replace-500x323.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2023/11/enable-media-replace-768x496.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2023/11/enable-media-replace.jpg 1190w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>If you are linking to a PDF you can add a query string to the file manually. To do that in the block editor, go to <em>edit visually</em> and manually edit the URL to add the query string:</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="183" src="https://webtrainingwheels.com/wp-content/uploads/2023/11/pdf-query-string-1024x183.jpg" alt="" class="wp-image-6098" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/11/pdf-query-string-1024x183.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2023/11/pdf-query-string-500x89.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2023/11/pdf-query-string-768x137.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2023/11/pdf-query-string-1536x274.jpg 1536w, https://webtrainingwheels.com/wp-content/uploads/2023/11/pdf-query-string.jpg 1614w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading">How to clear your browser cache in WordPress</h2>



<p>If you&#8217;ve followed along with the article so far, you&#8217;ll now realize that this question is a bit incorrect. As we&#8217;ve learned, the browser cache is not specific to WordPress. </p>



<p>The browser cache lives on each person&#8217;s device, so you can&#8217;t clear it from WordPress. </p>



<p>Each person has to clear their own browser cache on their own device. <a href="https://www.lifewire.com/how-to-clear-cache-2617980">Here&#8217;s how to do it in the major browsers</a>. </p>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Serve Static Assets with an Efficient Cache Policy in WordPress</title>
		<link>https://webtrainingwheels.com/serve-static-assets-efficient-cache-policy-wordpress/</link>
		
		<dc:creator><![CDATA[Lucy]]></dc:creator>
		<pubDate>Tue, 21 Nov 2023 20:32:07 +0000</pubDate>
				<category><![CDATA[Speed Optimization]]></category>
		<guid isPermaLink="false">https://webtrainingwheels.com/?p=6020</guid>

					<description><![CDATA[The Google PageSpeed recommendation to serve static assets with an efficient cache policy is all about browser caching. It&#8217;s usually pretty straightforward to fix on WordPress sites. &#8220;Static assets&#8221; means the files on your site: CSS, JavaScript, images, fonts, videos (and other media files). &#8220;Efficient cache policy&#8221; means that they have a long enough browser ... <p class="read-more-container"><a title="How to Serve Static Assets with an Efficient Cache Policy in WordPress" class="read-more button" href="https://webtrainingwheels.com/serve-static-assets-efficient-cache-policy-wordpress/#more-6020" aria-label="Read more about How to Serve Static Assets with an Efficient Cache Policy in WordPress">Read more</a></p>]]></description>
										<content:encoded><![CDATA[<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" width="620" height="250" src="https://webtrainingwheels.com/wp-content/uploads/2023/11/efficient-cache-policy-620x250-1.jpg" alt="" class="wp-image-6087" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/11/efficient-cache-policy-620x250-1.jpg 620w, https://webtrainingwheels.com/wp-content/uploads/2023/11/efficient-cache-policy-620x250-1-500x202.jpg 500w" sizes="(max-width: 620px) 100vw, 620px" /></figure></div>


<p>The <a href="https://webtrainingwheels.com/google-pagespeed-insights-guide-wordpress/" data-type="post" data-id="3444">Google PageSpeed recommendation</a> to serve <strong>static assets with an efficient cache policy</strong> is all about browser caching. It&#8217;s usually pretty straightforward to fix on WordPress sites.</p>



<p>&#8220;Static assets&#8221; means the files on your site: CSS, JavaScript, images, fonts, videos (and other media files).</p>



<p>&#8220;Efficient cache policy&#8221; means that they have a long enough browser caching value so that they do not have to be downloaded by your site visitors frequently.  Usually 4 months or longer is enough to satisfy Google and other tools.</p>



<span id="more-6020"></span>



<p><strong>This recommendation does not actually affect your overall score!</strong> It is a best practice to have a good browser caching policy for your site, but if it&#8217;s not &#8220;green&#8221; on your site, it won&#8217;t affect the score or Core Web Vitals.</p>



<p>I&#8217;ll let you know how to implement browser caching and how to troubleshoot issues.</p>



<div class="wp-block-group has-background" style="background-color:#f9f9f9"><div class="wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained">
<p class="has-text-align-center"><strong>Summary</strong></p>



<ul class="wp-block-list">
<li>Browser caching is a best practice but does not affect your PageSpeed score</li>



<li>This helps repeat visitors to your site</li>



<li>The easiest way to implement is using a caching plugin or asking your webhost</li>



<li>Cache policy can also be set at your CDN/Cloudflare</li>
</ul>
</div></div>






<h2 class="wp-block-heading">How to set up the correct cache policy</h2>



<p>You can only control the cache policy for files that are hosted on your own domain, or your CDN. You can&#8217;t control files coming from external domains, like Facebook, Google, Pinterest etc.</p>



<p>The rules are either set in the htaccess file of your site, or in the server configuration files. Most commonly they are set using &#8220;Expires&#8221; or &#8220;cache-control&#8221; rules. Either is fine.</p>



<p>It&#8217;s usually quite easy to apply the correct caching rules with one of the below methods. I&#8217;ve also provided a troubleshooting guide for common issues later on.</p>



<h3 class="wp-block-heading">Your webhost</h3>



<p>Most good webhosts apply browser caching automatically in the server configuration. If the values aren&#8217;t long enough, according to Google, you should be able to contact your host to have them adjusted.</p>



<h3 class="wp-block-heading">A caching plugin</h3>



<p>The easiest way to set this up is to use a caching or optimization plugin like WP Rocket, Flying Press etc. They add the necessary rules to the htaccess file for you. Of course, you&#8217;ll get tons more performance benefits from these plugins besides browser caching!</p>



<h3 class="wp-block-heading">Manually edit htaccess file</h3>



<p>If the two options above aren&#8217;t to your liking, you can manually add the caching rules to the htaccess file. </p>



<p>Copy/paste the following into your htaccess file to set the correct Expires rules: </p>


<pre class="wp-block-code"><span><code class="hljs language-php"><span class="hljs-comment"># Expires headers (for better cache control)</span>
&lt;IfModule mod_expires.c&gt;
ExpiresActive on
    ExpiresDefault                              <span class="hljs-string">"access plus 1 month"</span>
    <span class="hljs-comment"># cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5)</span>
    ExpiresByType text/cache-manifest           <span class="hljs-string">"access plus 0 seconds"</span>
    <span class="hljs-comment"># Your document html</span>
    ExpiresByType text/html                     <span class="hljs-string">"access plus 0 seconds"</span>
    <span class="hljs-comment"># Data</span>
    ExpiresByType text/xml                      <span class="hljs-string">"access plus 0 seconds"</span>
    ExpiresByType application/xml               <span class="hljs-string">"access plus 0 seconds"</span>
    ExpiresByType application/json              <span class="hljs-string">"access plus 0 seconds"</span>
    <span class="hljs-comment"># Feed</span>
    ExpiresByType application/rss+xml           <span class="hljs-string">"access plus 1 hour"</span>
    ExpiresByType application/atom+xml          <span class="hljs-string">"access plus 1 hour"</span>
    <span class="hljs-comment"># Favicon (cannot be renamed)</span>
    ExpiresByType image/x-icon                  <span class="hljs-string">"access plus 1 week"</span>
    <span class="hljs-comment"># Media: images, video, audio</span>
    ExpiresByType image/gif                     <span class="hljs-string">"access plus 4 months"</span>
    ExpiresByType image/png                     <span class="hljs-string">"access plus 4 months"</span>
    ExpiresByType image/jpeg                    <span class="hljs-string">"access plus 4 months"</span>
    ExpiresByType image/webp                    <span class="hljs-string">"access plus 4 months"</span>
    ExpiresByType video/ogg                     <span class="hljs-string">"access plus 4 months"</span>
    ExpiresByType audio/ogg                     <span class="hljs-string">"access plus 4 months"</span>
    ExpiresByType video/mp4                     <span class="hljs-string">"access plus 4 months"</span>
    ExpiresByType video/webm                    <span class="hljs-string">"access plus 4 months"</span>
    ExpiresByType image/avif                    <span class="hljs-string">"access plus 4 months"</span>
    ExpiresByType image/avif-sequence           <span class="hljs-string">"access plus 4 months"</span>
    <span class="hljs-comment"># HTC files  (css3pie)</span>
    ExpiresByType text/x-component              <span class="hljs-string">"access plus 1 month"</span>
    <span class="hljs-comment"># Webfonts</span>
    ExpiresByType font/ttf    <span class="hljs-string">"access plus 4 months"</span>
    ExpiresByType font/otf    <span class="hljs-string">"access plus 4 months"</span>
    ExpiresByType font/woff   <span class="hljs-string">"access plus 4 months"</span>
    ExpiresByType font/woff2  <span class="hljs-string">"access plus 4 months"</span>
    ExpiresByType image/svg+xml                 <span class="hljs-string">"access plus 4 months"</span>
    ExpiresByType application/vnd.ms-fontobject <span class="hljs-string">"access plus 1 month"</span>
    <span class="hljs-comment"># CSS and JavaScript</span>
    ExpiresByType text/css                      <span class="hljs-string">"access plus 1 year"</span>
    ExpiresByType application/javascript        <span class="hljs-string">"access plus 1 year"</span>
&lt;/IfModule&gt;
</code></span></pre>


<p>For these rules to be correctly applied, your server needs to have the <code>mod_expires</code> module activated. It will already be activated on the vast majority of webhosts .</p>



<h3 class="wp-block-heading">NGINX </h3>



<p>If your site is on an NGINX server and therefore without an htaccess file, you need your webhost or server admin to modify the server configuration and add the necessary rules. </p>



<p>You can ask them to add the following:</p>


<pre class="wp-block-code"><span><code class="hljs">location ~* \.(css|js|ico|gif|jpe?g|png|svg|eot|otf|woff|woff2|ttf|ogg|webp)$ {
	expires 1y; 
}</code></span></pre>


<p></p>



<h2 class="wp-block-heading">Troubleshooting</h2>



<p>If you&#8217;ve followed the above steps but PageSpeed is still showing you a warning about the cache policy for your static assets, there are a few common issues you can check.</p>



<h3 class="wp-block-heading">Check with your CDN</h3>



<p>If you are using a CDN like BunnyCDN, Key CDN etc, to serve static assets, you may need to tweak your settings there. They may be using different cache expiration than what&#8217;s set at your host. </p>



<p>CDNs may also apply rules which can end up overriding what you set. So you either need to contact the CDN to have them adjust it, or see if they have a settings, something like &#8220;respect existing headers&#8221; which will take the rules set at your main server. </p>



<h3 class="wp-block-heading">Cloudflare</h3>



<p>If your site is on Cloudflare, you can adjust the <em>Browser Cache TTL </em>setting. </p>



<p>Go to: Caching → Configuration → Browser Cache TTL</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="280" src="https://webtrainingwheels.com/wp-content/uploads/2023/11/browser-cache-ttl-cloudflare-1024x280.jpg" alt="" class="wp-image-6050" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/11/browser-cache-ttl-cloudflare-1024x280.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2023/11/browser-cache-ttl-cloudflare-500x137.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2023/11/browser-cache-ttl-cloudflare-768x210.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2023/11/browser-cache-ttl-cloudflare-1536x420.jpg 1536w, https://webtrainingwheels.com/wp-content/uploads/2023/11/browser-cache-ttl-cloudflare.jpg 1936w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h3 class="wp-block-heading">Cache TTL is none</h3>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="530" src="https://webtrainingwheels.com/wp-content/uploads/2023/11/pagespeed-cache-ttl-none-1024x530.jpg" alt="" class="wp-image-6052" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/11/pagespeed-cache-ttl-none-1024x530.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2023/11/pagespeed-cache-ttl-none-500x259.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2023/11/pagespeed-cache-ttl-none-768x398.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2023/11/pagespeed-cache-ttl-none-1536x796.jpg 1536w, https://webtrainingwheels.com/wp-content/uploads/2023/11/pagespeed-cache-ttl-none.jpg 1967w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>If the Cache TTL column lists &#8220;none&#8221; it means the server is not set up correctly and is likely missing the <code>mod_expires</code> module. You have to contact your webhost about this. </p>



<h3 class="wp-block-heading">Cache TTL is different than expected</h3>



<p>There&#8217;s a couple of reasons PageSpeed might detect a different value than the expected one.</p>



<p>If you have both <code>cache-control</code> and <code>expires</code> values defined differently, the <code>cache-control</code> value will take precedence:</p>



<figure class="wp-block-image size-full"><img decoding="async" width="980" height="488" src="https://webtrainingwheels.com/wp-content/uploads/2023/11/cache-control-vs-expires.jpg" alt="" class="wp-image-6035" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/11/cache-control-vs-expires.jpg 980w, https://webtrainingwheels.com/wp-content/uploads/2023/11/cache-control-vs-expires-500x249.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2023/11/cache-control-vs-expires-768x382.jpg 768w" sizes="(max-width: 980px) 100vw, 980px" /></figure>



<p><code>cache-control</code> is defined in seconds. So <code>max-age=1333600</code> gives a value of about 15 days, which is what PageSpeed sees for this asset:</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="314" src="https://webtrainingwheels.com/wp-content/uploads/2023/11/pagespeed-cache-control-1024x314.jpg" alt="" class="wp-image-6036" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/11/pagespeed-cache-control-1024x314.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2023/11/pagespeed-cache-control-500x153.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2023/11/pagespeed-cache-control-768x235.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2023/11/pagespeed-cache-control-1536x471.jpg 1536w, https://webtrainingwheels.com/wp-content/uploads/2023/11/pagespeed-cache-control.jpg 1912w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Check your htaccess file, if you have different values defined for the same file type, the rule that is furthest down in the file will take precedence.</p>



<p>If you would like to understand more about <a href="https://webtrainingwheels.com/browser-caching-wordpress">browser caching in WordPress, read our guide</a>.</p><div id="webtr-417783000" class="webtr-content">
                <div class='gf_browser_unknown gform_wrapper gform_legacy_markup_wrapper gform-theme--no-framework' data-form-theme='legacy' data-form-index='0' id='gform_wrapper_32' >
                        <div class='gform_heading'>
                            <h3 class="gform_title">Weekly WordPress Tips To Your Inbox</h3>
                        </div><form method='post' enctype='multipart/form-data'  id='gform_32'  action='/feed/' data-formid='32' novalidate> 
 <input type='hidden' class='gforms-pum' value='{"closepopup":false,"closedelay":0,"openpopup":false,"openpopup_id":0}' />
                        <div class='gform-body gform_body'><ul id='gform_fields_32' class='gform_fields top_label form_sublabel_below description_below validation_below'><li id="field_32_3" class="gfield gfield--type-honeypot gform_validation_container field_sublabel_below gfield--has-description field_description_below field_validation_below gfield_visibility_visible"  ><label class='gfield_label gform-field-label' for='input_32_3'>X/Twitter</label><div class='ginput_container'><input name='input_3' id='input_32_3' type='text' value='' autocomplete='new-password'/></div><div class='gfield_description' id='gfield_description_32_3'>This field is for validation purposes and should be left unchanged.</div></li><li id="field_32_1" class="gfield gfield--type-email gfield_contains_required field_sublabel_below gfield--no-description field_description_below field_validation_below gfield_visibility_visible"  ><label class='gfield_label gform-field-label screen-reader-text' for='input_32_1'>Enter Your Email, It&#039;s Free!<span class="gfield_required"><span class="gfield_required gfield_required_asterisk">*</span></span></label><div class='ginput_container ginput_container_email'>
                            <input name='input_1' id='input_32_1' type='email' value='' class='large'   placeholder='Enter Your Email, It&#039;s Free!' aria-required="true" aria-invalid="false"  />
                        </div></li><li id="field_32_2" class="gfield gfield--type-hidden gform_hidden field_sublabel_below gfield--no-description field_description_below field_validation_below gfield_visibility_visible"  ><div class='ginput_container ginput_container_text'><input name='input_2' id='input_32_2' type='hidden' class='gform_hidden'  aria-invalid="false" value='http://webtrainingwheels.com/feed/' /></div></li></ul></div>
        <div class='gform-footer gform_footer top_label'> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body><div class="gf-turnstile-container"> <div id="cf-turnstile-gf-32" class="cf-turnstile" data-callback="turnstileGravityCallback" data-sitekey="0x4AAAAAAA7A0N4QhHj7cf1O" data-theme="light" data-language="auto" data-size="normal" data-retry="auto" data-retry-interval="1000" data-refresh-expired="auto" data-action="gravity-form-32" data-appearance="always"></div> <style>.gform_button { pointer-events: none; opacity: 0.5; }</style> <script>document.addEventListener("DOMContentLoaded", function() { setTimeout(function(){ var e=document.getElementById("cf-turnstile-gf-32"); e&&!e.innerHTML.trim()&&(turnstile.remove("#cf-turnstile-gf-32"), turnstile.render("#cf-turnstile-gf-32", {sitekey:"0x4AAAAAAA7A0N4QhHj7cf1O"})); }, 100); });</script> <br class="cf-turnstile-br cf-turnstile-br-gf-32"> <style>#cf-turnstile-gf-32 { margin-left: -15px; }</style> </div> <style> .gf-turnstile-container { width: 100%; } .gform_footer.top_label { display: flex; flex-wrap: wrap; } </style> <script>document.addEventListener("DOMContentLoaded", function() {document.addEventListener('gform/post_render', function handlePostRender(event) {if (event.detail.formId !== 32) {return;}gform.utils.addAsyncFilter('gform/submission/pre_submission', async function handlePreSubmission(data) {document.addEventListener('gform/post_render', function rerenderTurnstile(event) {if (event.detail.formId !== 32) {return;}const turnstileElement = document.getElementById('cf-turnstile-gf-32');if (turnstileElement) {turnstile.remove('#cf-turnstile-gf-32');turnstile.render('#cf-turnstile-gf-32');}document.removeEventListener('gform/post_render', rerenderTurnstile);});gform.utils.removeFilter('gform/submission/pre_submission', handlePreSubmission);return data;});document.removeEventListener('gform/post_render', handlePostRender);});});</script><input type="submit" id="gform_submit_button_32" class="gform_button button" onclick="__gaTracker('send', 'event', { eventCategory: 'Forms', eventAction: 'Subscribe', eventLabel: 'PostFooter'});gform.submission.handleButtonClick(this);" data-submission-type="submit" value="Sign Up"></body></html>
 
            <input type='hidden' class='gform_hidden' name='gform_submission_method' data-js='gform_submission_method_32' value='postback' />
            <input type='hidden' class='gform_hidden' name='gform_theme' data-js='gform_theme_32' id='gform_theme_32' value='legacy' />
            <input type='hidden' class='gform_hidden' name='gform_style_settings' data-js='gform_style_settings_32' id='gform_style_settings_32' value='[]' />
            <input type='hidden' class='gform_hidden' name='is_submit_32' value='1' />
            <input type='hidden' class='gform_hidden' name='gform_submit' value='32' />
            
            <input type='hidden' class='gform_hidden' name='gform_currency' data-currency='USD' value='GeVxdrP8bs7T8v/jp+GxZGxYhtiU4ZafbQpuV3iGeoZ7YSPjBekiYwxFFG0ElFmpWW6Gb6ebdD3DfNFQZtsctr10041rvNou8cvcMM2m1hxuX6A=' />
            <input type='hidden' class='gform_hidden' name='gform_unique_id' value='' />
            <input type='hidden' class='gform_hidden' name='state_32' value='WyJbXSIsIjNhZjRhZTc2ODU5NzRiOTg2YjVjODkwMzk3M2ZhNTE5Il0=' />
            <input type='hidden' autocomplete='off' class='gform_hidden' name='gform_target_page_number_32' id='gform_target_page_number_32' value='0' />
            <input type='hidden' autocomplete='off' class='gform_hidden' name='gform_source_page_number_32' id='gform_source_page_number_32' value='1' />
            <input type='hidden' name='gform_field_values' value='' />
            
        </div>
                        </form>
                        </div><script>
gform.initializeOnLoaded( function() {gformInitSpinner( 32, 'http://webtrainingwheels.com/wp-content/plugins/gravityforms/images/spinner.svg', true );jQuery('#gform_ajax_frame_32').on('load',function(){var contents = jQuery(this).contents().find('*').html();var is_postback = contents.indexOf('GF_AJAX_POSTBACK') >= 0;if(!is_postback){return;}var form_content = jQuery(this).contents().find('#gform_wrapper_32');var is_confirmation = jQuery(this).contents().find('#gform_confirmation_wrapper_32').length > 0;var is_redirect = contents.indexOf('gformRedirect(){') >= 0;var is_form = form_content.length > 0 && ! is_redirect && ! is_confirmation;var mt = parseInt(jQuery('html').css('margin-top'), 10) + parseInt(jQuery('body').css('margin-top'), 10) + 100;if(is_form){jQuery('#gform_wrapper_32').html(form_content.html());if(form_content.hasClass('gform_validation_error')){jQuery('#gform_wrapper_32').addClass('gform_validation_error');} else {jQuery('#gform_wrapper_32').removeClass('gform_validation_error');}setTimeout( function() { /* delay the scroll by 50 milliseconds to fix a bug in chrome */  }, 50 );if(window['gformInitDatepicker']) {gformInitDatepicker();}if(window['gformInitPriceFields']) {gformInitPriceFields();}var current_page = jQuery('#gform_source_page_number_32').val();gformInitSpinner( 32, 'http://webtrainingwheels.com/wp-content/plugins/gravityforms/images/spinner.svg', true );jQuery(document).trigger('gform_page_loaded', [32, current_page]);window['gf_submitting_32'] = false;}else if(!is_redirect){var confirmation_content = jQuery(this).contents().find('.GF_AJAX_POSTBACK').html();if(!confirmation_content){confirmation_content = contents;}jQuery('#gform_wrapper_32').replaceWith(confirmation_content);jQuery(document).trigger('gform_confirmation_loaded', [32]);window['gf_submitting_32'] = false;wp.a11y.speak(jQuery('#gform_confirmation_message_32').text());}else{jQuery('#gform_32').append(contents);if(window['gformRedirect']) {gformRedirect();}}jQuery(document).trigger("gform_pre_post_render", [{ formId: "32", currentPage: "current_page", abort: function() { this.preventDefault(); } }]);        if (event && event.defaultPrevented) {                return;        }        const gformWrapperDiv = document.getElementById( "gform_wrapper_32" );        if ( gformWrapperDiv ) {            const visibilitySpan = document.createElement( "span" );            visibilitySpan.id = "gform_visibility_test_32";            gformWrapperDiv.insertAdjacentElement( "afterend", visibilitySpan );        }        const visibilityTestDiv = document.getElementById( "gform_visibility_test_32" );        let postRenderFired = false;        function triggerPostRender() {            if ( postRenderFired ) {                return;            }            postRenderFired = true;            gform.core.triggerPostRenderEvents( 32, current_page );            if ( visibilityTestDiv ) {                visibilityTestDiv.parentNode.removeChild( visibilityTestDiv );            }        }        function debounce( func, wait, immediate ) {            var timeout;            return function() {                var context = this, args = arguments;                var later = function() {                    timeout = null;                    if ( !immediate ) func.apply( context, args );                };                var callNow = immediate && !timeout;                clearTimeout( timeout );                timeout = setTimeout( later, wait );                if ( callNow ) func.apply( context, args );            };        }        const debouncedTriggerPostRender = debounce( function() {            triggerPostRender();        }, 200 );        if ( visibilityTestDiv && visibilityTestDiv.offsetParent === null ) {            const observer = new MutationObserver( ( mutations ) => {                mutations.forEach( ( mutation ) => {                    if ( mutation.type === 'attributes' && visibilityTestDiv.offsetParent !== null ) {                        debouncedTriggerPostRender();                        observer.disconnect();                    }                });            });            observer.observe( document.body, {                attributes: true,                childList: false,                subtree: true,                attributeFilter: [ 'style', 'class' ],            });        } else {            triggerPostRender();        }    } );} );
</script>
</div>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Reduce Unused CSS in WordPress</title>
		<link>https://webtrainingwheels.com/reduce-unused-css-wordpress/</link>
		
		<dc:creator><![CDATA[Lucy]]></dc:creator>
		<pubDate>Tue, 21 Nov 2023 20:15:30 +0000</pubDate>
				<category><![CDATA[Speed Optimization]]></category>
		<guid isPermaLink="false">https://webtrainingwheels.com/?p=5968</guid>

					<description><![CDATA[Addressing PageSpeed&#8217;s recommendation to Reduce Unused CSS improves your site&#8217;s overall score, along with the First Contentful Paint (FCP) and Largest Contentful Paint (LCP) metrics. Removing unused CSS is closely tied with removing render-blocking resources, and the plugins available will often let you achieve both things at once: Disclaimer: I do work with WP Rocket, ... <p class="read-more-container"><a title="Reduce Unused CSS in WordPress" class="read-more button" href="https://webtrainingwheels.com/reduce-unused-css-wordpress/#more-5968" aria-label="Read more about Reduce Unused CSS in WordPress">Read more</a></p>]]></description>
										<content:encoded><![CDATA[<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" width="620" height="250" src="https://webtrainingwheels.com/wp-content/uploads/2023/10/reduce-unused-css-620x250-1.jpg" alt="Reduce unused CSS in WordPress" class="wp-image-6002" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/10/reduce-unused-css-620x250-1.jpg 620w, https://webtrainingwheels.com/wp-content/uploads/2023/10/reduce-unused-css-620x250-1-500x202.jpg 500w" sizes="(max-width: 620px) 100vw, 620px" /></figure></div>


<p>Addressing <a href="https://webtrainingwheels.com/google-pagespeed-insights-guide-wordpress/" data-type="post" data-id="3444">PageSpeed&#8217;s recommendation to Reduce Unused CSS</a> improves your site&#8217;s overall score, along with the First Contentful Paint (FCP) and Largest Contentful Paint (LCP) metrics.</p>



<p>Removing unused CSS is closely tied with removing render-blocking resources, and the plugins available will often let you achieve both things at once:</p>



<ol class="wp-block-list">
<li>Load only the exact CSS needed for any given page</li>



<li>Make sure that CSS is not render-blocking</li>
</ol>



<span id="more-5968"></span>



<p><em>Disclaimer: I do work with WP Rocket, one of the plugins mentioned here, so I know the most about that plugin. But I tested all of them and remain unbiased for the purpose of reviewing potential solutions. I don&#8217;t get paid to write these posts and don&#8217;t have a vested interest in promoting WP Rocket over others. I am a WordPress site owner first and foremost. </em></p>



<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained">
<p class="has-background" style="background-color:#f9f9f9"><strong>Summary</strong><br>There are free and paid solutions. <br>The paid solutions I tested, WP Rocket, FlyingPress, Perfmatters, were the best, yielding the best PageSpeed scores and LCP/FCP metrics. <br>The user experience and frontend accuracy were superior to the free solutions, especially for sites with more complicated code. <br>It&#8217;s worth paying a little money for this optimization.<br>Do your own tests, optimization is rarely a one-size fits all practice.</p>
</div></div>






<h2 class="wp-block-heading">How does removing unused CSS work?</h2>



<p>The fundamental function of the plugins is the same &#8211; the plugin looks through all the CSS on your site, determines what is actually used, and adds only that used CSS to each page. </p>



<p>There are typically 2 ways to add the used CSS to your page: </p>



<ul class="wp-block-list">
<li>Internal &#8211; in a &lt;style&gt; tag on the page, so the CSS is in the HTML. This is also referred to as &#8220;inline.&#8221;</li>



<li>In an &#8220;external&#8221; CSS file, e.g. <code>yourdomain.com/wp-content/themes/style.css</code><br></li>



<li>In some cases, the additional unused CSS may be loaded after a user interaction. This will prevent the CSS from showing up as unused in a PageSpeed test, while also correcting any display/layout issues, on interaction.</li>
</ul>



<p>There are pros and cons to these methods. </p>



<p><strong>External CSS file</strong></p>



<ul class="wp-block-list">
<li>Can be browser cached. </li>



<li>Requires downloading an asset</li>



<li>Smaller improvement to PageSpeed score</li>
</ul>



<p>That means if you use the exact same CSS on multiple pages and your visitor goes to multiple pages, or if they visit the same page multiple times, they won&#8217;t have to re-download the file every time. The same CSS file could be stored in their browser and it will be faster for repeat visits.</p>



<p><strong>Internal/inline CSS</strong></p>



<ul class="wp-block-list">
<li>Can&#8217;t be browser cached. </li>



<li>The size of the page&#8217;s HTML will be bigger</li>



<li>Better PageSpeed score</li>
</ul>



<h3 class="wp-block-heading">Which method is better?</h3>



<p>I have read other articles that tell you the inline method is inferior. I disagree because it gives better PageSpeed results and to the naked eye, there is usually no discernible difference in loading speed. </p>



<p>Inserting the CSS directly inline will increase the size of the HTML. But again, in most cases this makes no difference to performance or user experience.</p>



<p>If the plugin you&#8217;re using gives you a choice, make sure to test for yourself because in web performance many things vary from site to site &#8211; each one is unique and not all blanket recommendations will hold up.</p>



<p>Additionally, in some plugins you can choose to delay the CSS. This is safer because it means you may miss fewer styles, but in my experience it can cause jumpiness on interaction with the page,so the user experience might be a bit weird.</p>



<p><strong>Factors that can affect how these features work on your site:</strong></p>



<p>Everyone thinks their site is simple but most people don&#8217;t really understand what&#8217;s under the hood of their site. A few factors are:</p>



<ul class="wp-block-list">
<li>How much CSS there is on your site to begin with</li>



<li>How much of the CSS depends on classes added by JavaScript. Sliders, animations, popups and other fancy features also rely on JavaScript and this can be harder for automated tools to detect. </li>



<li>How well the site is coded &#8211; code that does not follow best practices and standards may have more conflicts when optimized.</li>
</ul>



<p>This is a complicated optimization and it wouldn&#8217;t be unexpected to run into some issues and have to safelist some CSS selectors to fix the issues. </p>



<h2 class="wp-block-heading">Plugins to Reduce Unused CSS in WordPress</h2>



<p>The best solutions for reducing unused CSS are premium ones &#8211; that means plugins you have to pay for. But I have included a free one as well,  in case you&#8217;re on a strict budget.</p>



<p><strong>Testing process</strong></p>



<p>I tested all the plugins below on the same handful sites, to get an idea of how they perform. This is a small sample size and doesn&#8217;t mean you will have the same results. </p>



<p>The sites varied from very lightweight, to heavier and messier ones. </p>



<p>In all cases I used just page caching, plus the CSS feature. So the goal wasn&#8217;t to get the maximum score by activating all features, but to see the impact of reducing CSS on the scores. </p>



<p>I considered the following criteria for each:</p>



<ul class="wp-block-list">
<li><strong>Frontend result</strong>: Was the layout broken at all? Were there any quirks?</li>



<li><strong>PageSpeed</strong>: Did the score improve? Was the Reduce Unused CSS warning removed? Did the LCP and FCP metrics improve?</li>



<li><strong>User experience</strong>: How easy or difficult is it to work with and set up?</li>
</ul>



<h3 class="wp-block-heading">Premium Plugins to Reduce Unused CSS</h3>



<h4 class="wp-block-heading"><strong>WP Rocket</strong></h4>



<p><a href="https://wp-rocket.me">WP Rocket</a> is premium-only caching an optimization plugin. It has many optimization features, and was one of the first to manage&nbsp;removing unused CSS in an automated way.</p>



<p>WP Rocket&#8217;s<em> Remove Unused CSS</em> feature will handle this for you.</p>



<p>On the File Optimization tab, select <em>Optimize CSS Delivery</em>, then choose <em>Remove Unused CSS</em>.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="1000" height="693" src="https://webtrainingwheels.com/wp-content/uploads/2023/10/WP-Rocket-Remove-Unused-CSS.jpg" alt="" class="wp-image-5972" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/10/WP-Rocket-Remove-Unused-CSS.jpg 1000w, https://webtrainingwheels.com/wp-content/uploads/2023/10/WP-Rocket-Remove-Unused-CSS-500x347.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2023/10/WP-Rocket-Remove-Unused-CSS-768x532.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></figure>



<p>This feature will:</p>



<ul class="wp-block-list">
<li>Process each page on your site to determine only the used CSS.</li>



<li>Then it inserts that CSS inline into a &lt;style&gt; tag on your page. </li>



<li>No other CSS files will be loaded, and the inline CSS is not render-blocking</li>



<li>Automatically preload fonts</li>
</ul>



<p>The <em>Load CSS Asynchronously</em> feature will only make sure that the CSS is not render-blocking &#8211; it will not remove the unused rules, so it&#8217;s not relevant here.</p>



<p><strong>Pros</strong></p>



<ul class="wp-block-list">
<li>It&#8217;s the most accurate solution I&#8217;ve tested.</li>



<li>It&#8217;s actively improved for compatibility with common themes/plugins</li>



<li>It&#8217;s gives great PageSpeed results</li>



<li>There is in-depth documentation and a way to fix issues</li>



<li>Processing is done on an external server which means fixes can be applied immediately and all affected sites will benefit, without a plugin update. </li>



<li>If you need help, you can contact the Support team.</li>
</ul>



<p><strong>Cons</strong></p>



<ul class="wp-block-list">
<li>Due to the external processing, the feature isn&#8217;t applied instantly. It may take a couple of minutes for the first pages to be processed. </li>



<li>Depending on your server, processing can take longer compared to other plugins.</li>



<li>If you have a huge site with thousands of pages, it will take some time to process all of them.</li>
</ul>



<p><strong>Testing Notes</strong></p>



<ul class="wp-block-list">
<li><strong>Frontend result</strong>: this gave the most accurate layout of all the solutions I tested. </li>



<li><strong>PageSpeed</strong>: It most cases it produced the best score and LCP/FCP metrics and in all cases passed the reduced unused CSS audit most successfully.</li>



<li><strong>User experience</strong>: it&#8217;s easy to activate and you don&#8217;t have to choose from various options like the others, so it&#8217;s simple. The only confusing part can be that the feature isn&#8217;t applied instantly to all pages, so you may think it&#8217;s not working correctly, but you just need to wait a few more minutes. </li>
</ul>



<p>WP Rocket automatically preloads fonts that are found when Remove Unused CSS is active. In a few cases, it might improve FCP/LCP to prevent that from happening. You can do so with a code snippet,<a href="https://docs.wp-rocket.me/article/1529-remove-unused-css#preload-fonts"> found here</a>. </p>



<h4 class="wp-block-heading">FlyingPress</h4>



<p><a href="https://flyingpress.com/">FlyingPress</a> is another all-around caching and optimization plugin.</p>



<p>Whereas WP Rocket has a &#8220;decisions, not options&#8221; approach to the user interface and settings, FlyingPress offers more options. This is good for people who want to have more control, but makes things more complex for inexperienced users. </p>



<p>So in FlyingPress, when it comes to managing Remove Unused CSS you have 3 options:</p>



<ul class="wp-block-list">
<li>Asynchronously</li>



<li>On user interaction</li>



<li>Remove</li>
</ul>



<figure class="wp-block-image size-full"><img decoding="async" width="1000" height="512" src="https://webtrainingwheels.com/wp-content/uploads/2023/10/flyingpress-remove-unused-css.jpg" alt="" class="wp-image-5973" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/10/flyingpress-remove-unused-css.jpg 1000w, https://webtrainingwheels.com/wp-content/uploads/2023/10/flyingpress-remove-unused-css-500x256.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2023/10/flyingpress-remove-unused-css-768x393.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></figure>



<p>You will see the best results from using either the <em>On user interaction</em> or <em>Remove</em> options. </p>



<p>The benefit of <em>On user interaction</em> is that display issues should be corrected on interaction. Whereas if the CSS is removed, you would have to manually fix that by excluding stylesheets or CSS selectors. </p>



<p>But the downside of <em>On user interaction</em> is that you might see some flashing, or jumping in the layout after you interact with the page and other styles kick in. </p>



<p>In most cases, the PageSpeed warning about reduce unused CSS was generally resolved. But in some cases, the Google Font CSS was still listed as render-blocking:</p>



<figure class="wp-block-image size-full"><img decoding="async" width="1000" height="369" src="https://webtrainingwheels.com/wp-content/uploads/2023/10/flyingpress-google-font-render-blocking.jpg" alt="" class="wp-image-5985" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/10/flyingpress-google-font-render-blocking.jpg 1000w, https://webtrainingwheels.com/wp-content/uploads/2023/10/flyingpress-google-font-render-blocking-500x185.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2023/10/flyingpress-google-font-render-blocking-768x283.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></figure>



<ul class="wp-block-list">
<li><strong>Frontend result</strong>: If you use the Remove option, you may see a few unstyled, or incorrectly styled details. It was not always as accurate as WP Rocket. If you use, <em>On user interaction</em> you may see a little jumpiness when the styles kick in.</li>



<li><strong>PageSpeed</strong>: Scores improved, similar to Perfmatters, sometimes left a little render-blocking CSS and still a little unused CSS. LCP and FCP metrics improved and were competitive with WP Rocket and Perfmatters.</li>



<li><strong>User experience</strong>: Overall the user interface (UI) is pleasing but there&#8217;s no context given to which feature you should choose and no links to documentation. So it&#8217;s not necessarily the most user-friendly. </li>
</ul>



<p></p>



<p><strong>Pros</strong></p>



<ul class="wp-block-list">
<li>Nice UI but not much guidance given</li>



<li>Processes the pages pretty quickly</li>



<li>Good PageSpeed results</li>



<li>Overall a good option for managing CSS</li>



<li>Provides support</li>
</ul>



<p><strong>Cons</strong></p>



<ul class="wp-block-list">
<li>Options could be confusing to non-expert users</li>



<li>Some documentation but it&#8217;s a bit limited</li>
</ul>



<h4 class="wp-block-heading">Perfmatters</h4>



<p>Perfmatters is also a Premium-only plugin, <strong>heavily</strong> influenced by WP Rocket and FlyingPress, but differs from them because it&#8217;s not a full optimization plugin. The main difference is that Perfmatters doesn&#8217;t offer page caching. </p>



<p>So you can actually use Perfmatters at the same time as other caching plugins like WP Rocket. You just have to make sure not to activate duplicate optimizations in both plugins. </p>



<p>Go to <em>Settings  → Assets</em> and scroll down to the CSS section:</p>



<figure class="wp-block-image size-full"><img decoding="async" width="1000" height="702" src="https://webtrainingwheels.com/wp-content/uploads/2023/10/Perfmatters-Remove-Unused-CSS.jpg" alt="" class="wp-image-5975" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/10/Perfmatters-Remove-Unused-CSS.jpg 1000w, https://webtrainingwheels.com/wp-content/uploads/2023/10/Perfmatters-Remove-Unused-CSS-500x351.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2023/10/Perfmatters-Remove-Unused-CSS-768x539.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></figure>



<p>Perfmatters offers the most methods for removing unused CSS. In the Used CSS method you have: </p>



<ul class="wp-block-list">
<li>Inline (the same as internal CSS)</li>



<li>File</li>
</ul>



<p>Then you also choose a stylesheet behavior:</p>



<ul class="wp-block-list">
<li>Delay (equivalent to FlyingPress&#8217; <em>On user interaction</em> option)</li>



<li>Async</li>



<li>Remove</li>
</ul>



<p><a href="https://perfmatters.io/docs/remove-unused-css/#css-method" data-type="link" data-id="https://perfmatters.io/docs/remove-unused-css/#css-method">Perfmatters&#8217; documentation</a> states that the File method is: </p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>the best for user and perceived performance as the file can be cached on repeat visits and reduces the size of the HTML doc.</p>
</blockquote>



<p>But I did not find that to be the case. On the sites I tested, <strong>I got the best results from using <em>Inline</em> and either <em>Remove </em>or <em>Delay</em>. </strong></p>



<p>But one size does not necessarily fit all, so you should see what works for your site. </p>



<p>There are exclusion fields for stylesheets and files in case you need to fix display issues.</p>



<ul class="wp-block-list">
<li><strong>Frontend result</strong> &#8211; Overall the accuracy of removal was lower than either WP Rocket or Flying Press. To fix display issues you can use the Delay option but you may get jumpiness. The Remove options gives the smoothest user experience as long as you fix issues.</li>



<li><strong>PageSpeed</strong> &#8211; Metrics improved, but in some cases there was still some CSS reported as unused. </li>



<li><strong>User experience</strong>&#8211; I think there&#8217;s too many options which could be confusing for non-technical users. </li>
</ul>



<p><strong>Pros</strong> </p>



<ul class="wp-block-list">
<li>Works well, is effective in improving PageSpeed results</li>



<li>Pretty good documentation</li>
</ul>



<p><strong>Cons</strong></p>



<ul class="wp-block-list">
<li>Too many options to choose from &#8211; could be overwhelming for a beginner user. </li>



<li>You&#8217;ll still need a caching plugin as well (unless your host provides server caching)</li>
</ul>



<div class="wp-block-group callout"><div class="wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained">
<p>Keep reading about how to improve your WordPress site&#8217;s PageSpeed score:</p>



<ul class="wp-block-list">
<li><a href="https://webtrainingwheels.com/remove-unused-javascript-in-wordpress/" data-type="post" data-id="4925">Reduce unused JavaScript in WordPress</a></li>



<li><a href="https://webtrainingwheels.com/fix-avoid-excessive-dom-size-wordpress-pagespeed/" data-type="post" data-id="5866">How to Fix “Avoid an Excessive DOM Size” in WordPress: A Practical Guide</a></li>



<li><a href="https://webtrainingwheels.com/how-to-avoid-enormous-network-payloads-in-wordpress/" data-type="post" data-id="4786">How to avoid enormous network payloads in WordPress</a></li>
</ul>
</div></div>



<h3 class="wp-block-heading">Free plugin to Reduce Unused CSS</h3>



<p>I don&#8217;t really recommend free plugins for optimization because you may not get the support you need. </p>



<p>Unless you an expert, you are likely going to need help when some optimizations break something on your site. </p>



<p><strong>Debloat</strong></p>



<p><a href="https://wordpress.org/plugins/debloat/">Debloat is a free plugin</a>, available in the WordPress repository that specifically removes and optimizes CSS and JavaScript.</p>



<p>It is recommended to pair it with a caching plugin, but make sure that you don&#8217;t activate duplicate features in the caching plugin as well. I tested it in combination with WP Rocket&#8217;s page caching..</p>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-12 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><img decoding="async" width="1000" height="748" data-id="5990" src="https://webtrainingwheels.com/wp-content/uploads/2023/10/debloat-remove-unused-css1.jpg" alt="" class="wp-image-5990" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/10/debloat-remove-unused-css1.jpg 1000w, https://webtrainingwheels.com/wp-content/uploads/2023/10/debloat-remove-unused-css1-500x374.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2023/10/debloat-remove-unused-css1-768x574.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></figure>



<figure class="wp-block-image size-large"><img decoding="async" width="1000" height="491" data-id="5991" src="https://webtrainingwheels.com/wp-content/uploads/2023/10/debloat-remove-unused-css2.jpg" alt="" class="wp-image-5991" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/10/debloat-remove-unused-css2.jpg 1000w, https://webtrainingwheels.com/wp-content/uploads/2023/10/debloat-remove-unused-css2-500x246.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2023/10/debloat-remove-unused-css2-768x377.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></figure>
</figure>



<p><strong>Testing Notes</strong></p>



<ul class="wp-block-list">
<li><strong>Frontend result</strong>: In the cases I tested it on, it was less accurate than the other plugins, except on the most straightforward site.</li>



<li><strong>PageSpeed</strong>: Sometimes the reduce unused CSS message was still there, although it was improved</li>



<li><strong>User experience</strong>: Pretty good &#8211; the UI provides decent guidance on the features. I couldn&#8217;t find any actual documentation though. Since it&#8217;s a free plugin, you shouldn&#8217;t expect much in the way of support. <a href="https://wordpress.org/support/plugin/debloat/">Their support page</a> shows a lot of unanswered threads. So I&#8217;d only recommend this for more advanced site owners. </li>
</ul>



<p>In general, you&#8217;re going to get improved results from any of the above solutions. If you are not a developer, choose a solution that will provide support should you run into any issues, and one that is proactively developing and improving.</p><div id="webtr-3171895932" class="webtr-content">
                <div class='gf_browser_unknown gform_wrapper gform_legacy_markup_wrapper gform-theme--no-framework' data-form-theme='legacy' data-form-index='0' id='gform_wrapper_32' >
                        <div class='gform_heading'>
                            <h3 class="gform_title">Weekly WordPress Tips To Your Inbox</h3>
                        </div><form method='post' enctype='multipart/form-data'  id='gform_32'  action='/feed/' data-formid='32' novalidate> 
 <input type='hidden' class='gforms-pum' value='{"closepopup":false,"closedelay":0,"openpopup":false,"openpopup_id":0}' />
                        <div class='gform-body gform_body'><ul id='gform_fields_32' class='gform_fields top_label form_sublabel_below description_below validation_below'><li id="field_32_3" class="gfield gfield--type-honeypot gform_validation_container field_sublabel_below gfield--has-description field_description_below field_validation_below gfield_visibility_visible"  ><label class='gfield_label gform-field-label' for='input_32_3'>Phone</label><div class='ginput_container'><input name='input_3' id='input_32_3' type='text' value='' autocomplete='new-password'/></div><div class='gfield_description' id='gfield_description_32_3'>This field is for validation purposes and should be left unchanged.</div></li><li id="field_32_1" class="gfield gfield--type-email gfield_contains_required field_sublabel_below gfield--no-description field_description_below field_validation_below gfield_visibility_visible"  ><label class='gfield_label gform-field-label screen-reader-text' for='input_32_1'>Enter Your Email, It&#039;s Free!<span class="gfield_required"><span class="gfield_required gfield_required_asterisk">*</span></span></label><div class='ginput_container ginput_container_email'>
                            <input name='input_1' id='input_32_1' type='email' value='' class='large'   placeholder='Enter Your Email, It&#039;s Free!' aria-required="true" aria-invalid="false"  />
                        </div></li><li id="field_32_2" class="gfield gfield--type-hidden gform_hidden field_sublabel_below gfield--no-description field_description_below field_validation_below gfield_visibility_visible"  ><div class='ginput_container ginput_container_text'><input name='input_2' id='input_32_2' type='hidden' class='gform_hidden'  aria-invalid="false" value='http://webtrainingwheels.com/feed/' /></div></li></ul></div>
        <div class='gform-footer gform_footer top_label'> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body><div class="gf-turnstile-container"> <div id="cf-turnstile-gf-32" class="cf-turnstile" data-callback="turnstileGravityCallback" data-sitekey="0x4AAAAAAA7A0N4QhHj7cf1O" data-theme="light" data-language="auto" data-size="normal" data-retry="auto" data-retry-interval="1000" data-refresh-expired="auto" data-action="gravity-form-32" data-appearance="always"></div> <style>.gform_button { pointer-events: none; opacity: 0.5; }</style> <script>document.addEventListener("DOMContentLoaded", function() { setTimeout(function(){ var e=document.getElementById("cf-turnstile-gf-32"); e&&!e.innerHTML.trim()&&(turnstile.remove("#cf-turnstile-gf-32"), turnstile.render("#cf-turnstile-gf-32", {sitekey:"0x4AAAAAAA7A0N4QhHj7cf1O"})); }, 100); });</script> <br class="cf-turnstile-br cf-turnstile-br-gf-32"> <style>#cf-turnstile-gf-32 { margin-left: -15px; }</style> </div> <style> .gf-turnstile-container { width: 100%; } .gform_footer.top_label { display: flex; flex-wrap: wrap; } </style> <script>document.addEventListener("DOMContentLoaded", function() {document.addEventListener('gform/post_render', function handlePostRender(event) {if (event.detail.formId !== 32) {return;}gform.utils.addAsyncFilter('gform/submission/pre_submission', async function handlePreSubmission(data) {document.addEventListener('gform/post_render', function rerenderTurnstile(event) {if (event.detail.formId !== 32) {return;}const turnstileElement = document.getElementById('cf-turnstile-gf-32');if (turnstileElement) {turnstile.remove('#cf-turnstile-gf-32');turnstile.render('#cf-turnstile-gf-32');}document.removeEventListener('gform/post_render', rerenderTurnstile);});gform.utils.removeFilter('gform/submission/pre_submission', handlePreSubmission);return data;});document.removeEventListener('gform/post_render', handlePostRender);});});</script><input type="submit" id="gform_submit_button_32" class="gform_button button" onclick="__gaTracker('send', 'event', { eventCategory: 'Forms', eventAction: 'Subscribe', eventLabel: 'PostFooter'});gform.submission.handleButtonClick(this);" data-submission-type="submit" value="Sign Up"></body></html>
 
            <input type='hidden' class='gform_hidden' name='gform_submission_method' data-js='gform_submission_method_32' value='postback' />
            <input type='hidden' class='gform_hidden' name='gform_theme' data-js='gform_theme_32' id='gform_theme_32' value='legacy' />
            <input type='hidden' class='gform_hidden' name='gform_style_settings' data-js='gform_style_settings_32' id='gform_style_settings_32' value='[]' />
            <input type='hidden' class='gform_hidden' name='is_submit_32' value='1' />
            <input type='hidden' class='gform_hidden' name='gform_submit' value='32' />
            
            <input type='hidden' class='gform_hidden' name='gform_currency' data-currency='USD' value='6pB+QYANINzpxD8h7YXUc2ath9QNJeLmn7keWrlk0hHZnv0HASmEW3HWgOPqwnHVbozSWj6czKch18hnEco1Im5AV+wLVejvcgHc85DgawyohFs=' />
            <input type='hidden' class='gform_hidden' name='gform_unique_id' value='' />
            <input type='hidden' class='gform_hidden' name='state_32' value='WyJbXSIsIjNhZjRhZTc2ODU5NzRiOTg2YjVjODkwMzk3M2ZhNTE5Il0=' />
            <input type='hidden' autocomplete='off' class='gform_hidden' name='gform_target_page_number_32' id='gform_target_page_number_32' value='0' />
            <input type='hidden' autocomplete='off' class='gform_hidden' name='gform_source_page_number_32' id='gform_source_page_number_32' value='1' />
            <input type='hidden' name='gform_field_values' value='' />
            
        </div>
                        </form>
                        </div><script>
gform.initializeOnLoaded( function() {gformInitSpinner( 32, 'http://webtrainingwheels.com/wp-content/plugins/gravityforms/images/spinner.svg', true );jQuery('#gform_ajax_frame_32').on('load',function(){var contents = jQuery(this).contents().find('*').html();var is_postback = contents.indexOf('GF_AJAX_POSTBACK') >= 0;if(!is_postback){return;}var form_content = jQuery(this).contents().find('#gform_wrapper_32');var is_confirmation = jQuery(this).contents().find('#gform_confirmation_wrapper_32').length > 0;var is_redirect = contents.indexOf('gformRedirect(){') >= 0;var is_form = form_content.length > 0 && ! is_redirect && ! is_confirmation;var mt = parseInt(jQuery('html').css('margin-top'), 10) + parseInt(jQuery('body').css('margin-top'), 10) + 100;if(is_form){jQuery('#gform_wrapper_32').html(form_content.html());if(form_content.hasClass('gform_validation_error')){jQuery('#gform_wrapper_32').addClass('gform_validation_error');} else {jQuery('#gform_wrapper_32').removeClass('gform_validation_error');}setTimeout( function() { /* delay the scroll by 50 milliseconds to fix a bug in chrome */  }, 50 );if(window['gformInitDatepicker']) {gformInitDatepicker();}if(window['gformInitPriceFields']) {gformInitPriceFields();}var current_page = jQuery('#gform_source_page_number_32').val();gformInitSpinner( 32, 'http://webtrainingwheels.com/wp-content/plugins/gravityforms/images/spinner.svg', true );jQuery(document).trigger('gform_page_loaded', [32, current_page]);window['gf_submitting_32'] = false;}else if(!is_redirect){var confirmation_content = jQuery(this).contents().find('.GF_AJAX_POSTBACK').html();if(!confirmation_content){confirmation_content = contents;}jQuery('#gform_wrapper_32').replaceWith(confirmation_content);jQuery(document).trigger('gform_confirmation_loaded', [32]);window['gf_submitting_32'] = false;wp.a11y.speak(jQuery('#gform_confirmation_message_32').text());}else{jQuery('#gform_32').append(contents);if(window['gformRedirect']) {gformRedirect();}}jQuery(document).trigger("gform_pre_post_render", [{ formId: "32", currentPage: "current_page", abort: function() { this.preventDefault(); } }]);        if (event && event.defaultPrevented) {                return;        }        const gformWrapperDiv = document.getElementById( "gform_wrapper_32" );        if ( gformWrapperDiv ) {            const visibilitySpan = document.createElement( "span" );            visibilitySpan.id = "gform_visibility_test_32";            gformWrapperDiv.insertAdjacentElement( "afterend", visibilitySpan );        }        const visibilityTestDiv = document.getElementById( "gform_visibility_test_32" );        let postRenderFired = false;        function triggerPostRender() {            if ( postRenderFired ) {                return;            }            postRenderFired = true;            gform.core.triggerPostRenderEvents( 32, current_page );            if ( visibilityTestDiv ) {                visibilityTestDiv.parentNode.removeChild( visibilityTestDiv );            }        }        function debounce( func, wait, immediate ) {            var timeout;            return function() {                var context = this, args = arguments;                var later = function() {                    timeout = null;                    if ( !immediate ) func.apply( context, args );                };                var callNow = immediate && !timeout;                clearTimeout( timeout );                timeout = setTimeout( later, wait );                if ( callNow ) func.apply( context, args );            };        }        const debouncedTriggerPostRender = debounce( function() {            triggerPostRender();        }, 200 );        if ( visibilityTestDiv && visibilityTestDiv.offsetParent === null ) {            const observer = new MutationObserver( ( mutations ) => {                mutations.forEach( ( mutation ) => {                    if ( mutation.type === 'attributes' && visibilityTestDiv.offsetParent !== null ) {                        debouncedTriggerPostRender();                        observer.disconnect();                    }                });            });            observer.observe( document.body, {                attributes: true,                childList: false,                subtree: true,                attributeFilter: [ 'style', 'class' ],            });        } else {            triggerPostRender();        }    } );} );
</script>
</div>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Fix &#8220;Avoid an Excessive DOM Size&#8221; in WordPress: A Practical Guide</title>
		<link>https://webtrainingwheels.com/fix-avoid-excessive-dom-size-wordpress-pagespeed/</link>
		
		<dc:creator><![CDATA[Lucy]]></dc:creator>
		<pubDate>Tue, 18 Jul 2023 23:34:54 +0000</pubDate>
				<category><![CDATA[Speed Optimization]]></category>
		<guid isPermaLink="false">https://webtrainingwheels.com/?p=5866</guid>

					<description><![CDATA[The PageSpeed recommendation to &#8220;avoid an excessive DOM size&#8221; is a tricky one for WordPress site owners. There isn&#8217;t a plugin that can magically fix this for you. You, the site owner, will need to make some changes to your content. Most of the articles you&#8217;ll find on this topic are going to go into ... <p class="read-more-container"><a title="How to Fix &#8220;Avoid an Excessive DOM Size&#8221; in WordPress: A Practical Guide" class="read-more button" href="https://webtrainingwheels.com/fix-avoid-excessive-dom-size-wordpress-pagespeed/#more-5866" aria-label="Read more about How to Fix &#8220;Avoid an Excessive DOM Size&#8221; in WordPress: A Practical Guide">Read more</a></p>]]></description>
										<content:encoded><![CDATA[<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" width="620" height="250" src="https://webtrainingwheels.com/wp-content/uploads/2023/07/dom-tree-620x250-1.jpg" alt="" class="wp-image-5944" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/07/dom-tree-620x250-1.jpg 620w, https://webtrainingwheels.com/wp-content/uploads/2023/07/dom-tree-620x250-1-500x202.jpg 500w" sizes="(max-width: 620px) 100vw, 620px" /></figure></div>


<p>The PageSpeed recommendation to &#8220;avoid an excessive DOM size&#8221; is a tricky one for WordPress site owners. There isn&#8217;t a plugin that can magically fix this for you. You, the site owner, will need to make some changes to your content. </p>



<p>Most of the articles you&#8217;ll find on this topic are going to go into the technical things to do which aren&#8217;t possible for non-developers. However, this guide is a practical one for WordPress site owners. </p>



<span id="more-5866"></span>



<p>In this guide I will show you:</p>



<ol class="wp-block-list">
<li>How to identify what&#8217;s causing DOM size problems on your pages</li>



<li>How to fix the problems.</li>
</ol>



<p>If you&#8217;re trying to improve your PageSpeed score, also check out these other guides: </p>



<ul class="wp-block-list">
<li><a href="https://webtrainingwheels.com/google-pagespeed-insights-guide-wordpress/" data-type="post" data-id="3444">Google PageSpeed Insights – A Guide for WordPress Users</a></li>



<li><a href="https://webtrainingwheels.com/remove-unused-javascript-in-wordpress/" data-type="post" data-id="4925">Reduce unused JavaScript in WordPress</a></li>



<li><a href="https://webtrainingwheels.com/how-to-avoid-enormous-network-payloads-in-wordpress/" data-type="post" data-id="4786">How to avoid enormous network payloads in WordPress</a></li>
</ul>






<p>We&#8217;ll start with a little bit of technical stuff, because you have to have some idea of what PageSpeed is talking about here. But then we&#8217;ll get into practical steps you can take to fix it and look at some real world examples.</p>



<h2 class="wp-block-heading">What&#8217;s the DOM and why does it matter?</h2>



<p>DOM stands for Document Object Model. This is a tree-like map that represents all of the elements of HTML code on your page. The browser uses this map to build the web page that we actually see.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="537" src="https://webtrainingwheels.com/wp-content/uploads/2023/07/dom-tree-1024x537.png" alt="" class="wp-image-5939" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/07/dom-tree-1024x537.png 1024w, https://webtrainingwheels.com/wp-content/uploads/2023/07/dom-tree-500x262.png 500w, https://webtrainingwheels.com/wp-content/uploads/2023/07/dom-tree-768x403.png 768w, https://webtrainingwheels.com/wp-content/uploads/2023/07/dom-tree.png 1086w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Every element, like an <code>&lt;img</code>&gt;, <code>&lt;div&gt;</code>  or a <code>&lt;p</code>&gt; is a node in this structure. </p>



<p>If you&#8217;ve ever used &#8220;inspect element&#8221; in your browser, you&#8217;ve seen the DOM. The top half of the screenshot below shows a basic webpage. The lower half of the screenshot shows the Elements panel of the developer tools in Chrome and here we can see the DOM:</p>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2023/06/dom-structure-example.jpg"><img decoding="async" width="1024" height="590" src="https://webtrainingwheels.com/wp-content/uploads/2023/06/dom-structure-example-1024x590.jpg" alt="" class="wp-image-5871" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/06/dom-structure-example-1024x590.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2023/06/dom-structure-example-500x288.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2023/06/dom-structure-example-768x443.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2023/06/dom-structure-example-1536x886.jpg 1536w, https://webtrainingwheels.com/wp-content/uploads/2023/06/dom-structure-example.jpg 1984w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>I&#8217;ve underlined the visible text in blue, and the 5 DOM elements that create it are indicated with red arrows. </p>



<p>This is a pretty simple structure, but later on we&#8217;ll see some complicated examples.</p>



<p>Whenever you add any content to your page, like a paragraph of text, or an image, it&#8217;s adding elements to the DOM. If your page was made only of basic text and simple images, DOM size probably wouldn&#8217;t be an issue.</p>



<p>Problems usually start to arise when more complicated features, like sliders for example, are added. Because these often require many DOM elements to contain the required code.</p>



<p><strong>The more complicated and large the DOM structure is, the more intensive the processing the browser has to do to read and process it. That means it will take longer to show content to your visitor. </strong></p>



<p>Therefore PageSpeed wants your page&#8217;s DOM to be a reasonable size, so that won&#8217;t slow down the page.</p>



<p><strong>When does PageSpeed show the DOM size recommendation?</strong></p>



<p>PageSpeed specifically checks the &lt;body&gt; element of your page. <br>It shows a <em>warning</em> when the &lt;body&gt; has more than <strong>800</strong> nodes/elements<br>It shows an <em>error</em> when there are more than<strong> 1,400</strong> nodes/elements</p>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2023/07/pagespeed-avoid-excessive-dom-size.jpg"><img decoding="async" width="1024" height="460" src="https://webtrainingwheels.com/wp-content/uploads/2023/07/pagespeed-avoid-excessive-dom-size-1024x460.jpg" alt="" class="wp-image-5876" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/07/pagespeed-avoid-excessive-dom-size-1024x460.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2023/07/pagespeed-avoid-excessive-dom-size-500x225.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2023/07/pagespeed-avoid-excessive-dom-size-768x345.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2023/07/pagespeed-avoid-excessive-dom-size-1536x691.jpg 1536w, https://webtrainingwheels.com/wp-content/uploads/2023/07/pagespeed-avoid-excessive-dom-size.jpg 1988w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>PageSpeed also gives you the following info:<br><strong>Maximum DOM depth </strong>&#8211; this is the longest sequence of nested elements on the page, in other words the distance from a given element to the root element of the page.</p>



<p><strong>Maximum child elements</strong> &#8211; this is the element that contains the highest number of child elements in the DOM, on the page</p>



<p>But, don&#8217;t get too caught up in those 2 numbers, they aren&#8217;t necessarily the most helpful in actually troubleshooting your page. </p>



<p>Reducing the overall number of elements is the goal.</p>



<h2 class="wp-block-heading">What adds to the DOM size on WordPress sites?</h2>



<p>Anything that adds code to your page can add to the DOM size. In WordPress this means:</p>



<ol class="wp-block-list">
<li>Your theme</li>



<li>Your plugins</li>



<li>Your content</li>
</ol>



<p>Although you may not be writing the code directly, you do still have a lot of control over the DOM size with the choices you make, as we&#8217;ll see below. </p>



<h2 class="wp-block-heading">How to find the biggest contributors to DOM size on your site</h2>



<p>I recommend using the <a href="https://chrome.google.com/webstore/detail/dom-size-analyzer/mcneiimlodlbmohipgdbbglgbmaoojen">DOM Size Analyzer Chrome extension </a>to help you find the sources of excessive DOM size. </p>



<ol class="wp-block-list">
<li>Add the extension to your browser.</li>



<li>Navigate to the page on your site that you want to improve</li>



<li>Right click and choose Inspect</li>



<li>Find the tab named Analyze DOM Size</li>



<li>Click the Play button<br>This analyzes the page and gives you the total number of DOM elements. Below that it displays the elements of the DOM tree, each with the number of nodes. </li>



<li>Since HTML is nested, you have to click into elements to find the sections that match your content.<br>Keep clicking on the element with the largest number until you get into more specific parts of the content<br>Find the row with the largest number of descendants:</li>



<li>As you click into elements, you will see that the corresponding part of the page becomes highlighted, as you mouse over them (see gif below)</li>



<li>This will allow you to see exactly which parts of the page are contributing the most to the DOM bloat.</li>



<li>Once you have that info you can either remove that element, or reduce its footprint: reduce the number of images, reduce number of featured items, reduce number of slides etc.</li>
</ol>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-13 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2023/07/analyze-dom-size-entension.jpg"><img decoding="async" width="1024" height="489" data-id="5879" src="https://webtrainingwheels.com/wp-content/uploads/2023/07/analyze-dom-size-entension-1024x489.jpg" alt="" class="wp-image-5879" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/07/analyze-dom-size-entension-1024x489.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2023/07/analyze-dom-size-entension-500x239.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2023/07/analyze-dom-size-entension-768x366.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2023/07/analyze-dom-size-entension-1536x733.jpg 1536w, https://webtrainingwheels.com/wp-content/uploads/2023/07/analyze-dom-size-entension-2048x977.jpg 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2023/07/dom-size-analyzer-panel.jpg"><img decoding="async" width="1024" height="369" data-id="5880" src="https://webtrainingwheels.com/wp-content/uploads/2023/07/dom-size-analyzer-panel-1024x369.jpg" alt="" class="wp-image-5880" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/07/dom-size-analyzer-panel-1024x369.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2023/07/dom-size-analyzer-panel-500x180.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2023/07/dom-size-analyzer-panel-768x277.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2023/07/dom-size-analyzer-panel-1536x554.jpg 1536w, https://webtrainingwheels.com/wp-content/uploads/2023/07/dom-size-analyzer-panel-2048x739.jpg 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>
</figure>



<p></p>



<figure class="wp-block-image size-large"><img decoding="async" src="https://webtrainingwheels.com/wp-content/uploads/2023/07/dom-analyzer.gif" alt=""/></figure>



<h2 class="wp-block-heading">Practical tips and examples for site owners</h2>



<h3 class="wp-block-heading">Avoid page builders</h3>



<p>Page builders like Elementor and WP Bakery are notorious for being inefficiently coded. They output messy HTML with tons of nested elements (sometimes referred to as &#8220;div soup&#8221;), often triggering the PageSpeed warning. </p>



<p>The goal of page builders is to make it easy for you build complicated pages, and maintaining best practices when trying to provide a huge number of easy-to-use features, is challenging.</p>



<p>Here&#8217;s an example:</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="379" src="https://webtrainingwheels.com/wp-content/uploads/2023/07/complicated-image-1024x379.jpg" alt="" class="wp-image-5883" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/07/complicated-image-1024x379.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2023/07/complicated-image-500x185.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2023/07/complicated-image-768x284.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2023/07/complicated-image-1536x568.jpg 1536w, https://webtrainingwheels.com/wp-content/uploads/2023/07/complicated-image-2048x758.jpg 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p><br>This image looks simple enough. It&#8217;s not part of a slider or anything fancy, it&#8217;s just a basic image. It shouldn&#8217;t generate too many DOM elements normally.</p>



<p>But, when we check the DOM, look at the amount of nesting it takes to get to that image:</p>



<figure class="wp-block-image size-full"><img decoding="async" width="1720" height="955" src="https://webtrainingwheels.com/wp-content/uploads/2023/07/jetelements-image.gif" alt="" class="wp-image-5884"/></figure>



<p>Even if you are not familiar with code, you can see the slope of the indentation in the code &#8211; the longer the slope, the more nested elements there are. That&#8217;s an example of overly complicated and bloated code.</p>



<p>This is because the site owner used an additional plugin and a parallax section to add basic image and text.</p>



<p><strong>Takeaways</strong>:</p>



<ul class="wp-block-list">
<li>Always use the simplest method you can to build your pages.</li>



<li>Switch to simpler themes like GeneratePress, Astra, etc.</li>



<li>Avoid page builders</li>
</ul>



<p>But your theme or page builder by itself is not the whole story.</p>



<h3 class="wp-block-heading">Reduce menu items, avoid mega menus</h3>



<p>Huge navigation menus, like mega menus, will add many more DOM elements.</p>



<p>A mega menu, or uber menu, looks like the example below. It generally contains many navigation links, usually organized in columns, and may also contain images and icons:<br></p>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2023/07/mega-menu.jpg"><img decoding="async" width="1024" height="434" src="https://webtrainingwheels.com/wp-content/uploads/2023/07/mega-menu-1024x434.jpg" alt="" class="wp-image-5886" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/07/mega-menu-1024x434.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2023/07/mega-menu-500x212.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2023/07/mega-menu-768x325.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2023/07/mega-menu-1536x651.jpg 1536w, https://webtrainingwheels.com/wp-content/uploads/2023/07/mega-menu-2048x868.jpg 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p><br>They may look nice and may seem like a good way to include many links to your content, but they come with a cost.</p>



<p>This UberMenu widget contains 450 DOM elements! That&#8217;s more than 50% of the &#8220;budget&#8221; for the whole page!</p>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2023/07/ubermenu-widget-1.jpg"><img decoding="async" width="1024" height="398" src="https://webtrainingwheels.com/wp-content/uploads/2023/07/ubermenu-widget-1-1024x398.jpg" alt="" class="wp-image-5942" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/07/ubermenu-widget-1-1024x398.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2023/07/ubermenu-widget-1-500x194.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2023/07/ubermenu-widget-1-768x299.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2023/07/ubermenu-widget-1-1536x597.jpg 1536w, https://webtrainingwheels.com/wp-content/uploads/2023/07/ubermenu-widget-1-2048x796.jpg 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>Even if you don&#8217;t use a mega menu, but you create many items with a lot of drop-downs, you will still be adding quite a lot of DOM elements. </p>



<h3 class="wp-block-heading">Reduce rows of products and other featured items</h3>



<p>Ecommerce sites are often amongst the worst offenders when it comes to DOM size. They tend to use many rows of featured products, which bloat the DOM.</p>



<p>This single product carousel has 353 elements:</p>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2023/07/product-carousel.jpg"><img decoding="async" width="1024" height="455" src="https://webtrainingwheels.com/wp-content/uploads/2023/07/product-carousel-1024x455.jpg" alt="" class="wp-image-5889" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/07/product-carousel-1024x455.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2023/07/product-carousel-500x222.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2023/07/product-carousel-768x341.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2023/07/product-carousel-1536x682.jpg 1536w, https://webtrainingwheels.com/wp-content/uploads/2023/07/product-carousel-2048x909.jpg 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>If that was the only one on the page, that might be OK.</p>



<p>But on this site there are multiple rows of product carousels:</p>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2023/07/rows-of-carousels.jpg"><img decoding="async" width="1024" height="537" src="https://webtrainingwheels.com/wp-content/uploads/2023/07/rows-of-carousels-1024x537.jpg" alt="" class="wp-image-5890" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/07/rows-of-carousels-1024x537.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2023/07/rows-of-carousels-500x262.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2023/07/rows-of-carousels-768x403.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2023/07/rows-of-carousels-1536x805.jpg 1536w, https://webtrainingwheels.com/wp-content/uploads/2023/07/rows-of-carousels-2048x1074.jpg 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>So those hundreds of elements really add up!</p>



<p>This could apply to any type of row, it doesn&#8217;t have to be products specifically. It could be portfolio items, blog posts etc.</p>



<p>Use simple images instead of animated carousels or sliders. </p>



<p>This product row which is just images, has only 48 elements:</p>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2023/07/simple-product-row.jpg"><img decoding="async" width="1024" height="354" src="https://webtrainingwheels.com/wp-content/uploads/2023/07/simple-product-row-1024x354.jpg" alt="" class="wp-image-5891" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/07/simple-product-row-1024x354.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2023/07/simple-product-row-500x173.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2023/07/simple-product-row-768x266.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2023/07/simple-product-row-1536x531.jpg 1536w, https://webtrainingwheels.com/wp-content/uploads/2023/07/simple-product-row-2048x708.jpg 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p><strong>Takeaways</strong></p>



<ul class="wp-block-list">
<li>Reduce the number of rows</li>



<li>Reduce the number of products or items per row</li>



<li>Use simple images instead of animated carousels</li>
</ul>



<p></p>



<h3 class="wp-block-heading">Don&#8217;t overuse tabs and accordions</h3>



<p>Tabs, accordions, toggles &#8211; these are a good way to include more content on your page without the need for a lot of scrolling.</p>



<p>But you should be aware that even if your visitor doesn&#8217;t see all of the content at once, it&#8217;s still present in the DOM. So if each tab has a ton of content in it, this can still bloat the DOM.</p>



<p>In the example below, there&#8217;s 246 DOM elements hiding behind those tabs:</p>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2023/07/woocommerce-tabs.jpg"><img decoding="async" width="1024" height="473" src="https://webtrainingwheels.com/wp-content/uploads/2023/07/woocommerce-tabs-1024x473.jpg" alt="" class="wp-image-5893" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/07/woocommerce-tabs-1024x473.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2023/07/woocommerce-tabs-500x231.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2023/07/woocommerce-tabs-768x355.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2023/07/woocommerce-tabs-1536x710.jpg 1536w, https://webtrainingwheels.com/wp-content/uploads/2023/07/woocommerce-tabs-2048x947.jpg 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<h3 class="wp-block-heading">Don&#8217;t use CSS to hide content</h3>



<p>Some themes and plugins will use CSS to hide content, for example to control which content shows on desktop vs. mobile.</p>



<p>This is a relatively easy and convenient way to handle different content for different devices, but the problem is that the &#8220;hidden&#8221; elements are still present in the DOM. So if you use this method too much, it could bloat the DOM too much.</p>



<p>For example, take a look at what Elementor does &#8211; it uses CSS to hide elements not intended for desktop:</p>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-14 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2023/07/elementor-hidden-elements.jpg"><img decoding="async" width="1024" height="276" data-id="5903" src="https://webtrainingwheels.com/wp-content/uploads/2023/07/elementor-hidden-elements-1024x276.jpg" alt="" class="wp-image-5903" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/07/elementor-hidden-elements-1024x276.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2023/07/elementor-hidden-elements-500x135.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2023/07/elementor-hidden-elements-768x207.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2023/07/elementor-hidden-elements-1536x413.jpg 1536w, https://webtrainingwheels.com/wp-content/uploads/2023/07/elementor-hidden-elements-2048x551.jpg 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2023/07/hidden-elements-dom-size.jpg"><img decoding="async" width="1024" height="299" data-id="5895" src="https://webtrainingwheels.com/wp-content/uploads/2023/07/hidden-elements-dom-size-1024x299.jpg" alt="" class="wp-image-5895" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/07/hidden-elements-dom-size-1024x299.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2023/07/hidden-elements-dom-size-500x146.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2023/07/hidden-elements-dom-size-768x224.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2023/07/hidden-elements-dom-size-1536x448.jpg 1536w, https://webtrainingwheels.com/wp-content/uploads/2023/07/hidden-elements-dom-size-2048x597.jpg 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>
</figure>



<p><br>Depending on how many elements each one has and how many hidden sections there are, that could contribute to the unnecessary size.</p>



<p></p>



<h3 class="wp-block-heading">Streamline your pages</h3>



<p>Whether or not your theme and plugins output messy or clean code, you will always make things worse if you load up your pages with tons of unnecessary content.</p>



<p>Some site owners throw a lot of content on the page, especially the homepage because they want to showcase everything they&#8217;ve got and they don&#8217;t make choices. </p>



<p>The longer your page is, the more content you add to it, the bigger the DOM size will be.</p>



<p>But this will only overwhelm your visitor. </p>



<p>Creating shorter, more focused pages will improve the DOM size and will also help your visitor.  </p>



<p>Here are a few examples of content choices you can make, to reduce the DOM:</p>



<ul class="wp-block-list">
<li>Consider using simple, static images instead of sliders. </li>



<li>If you must use a slider, don&#8217;t add a ton of images. 10 slides will add more DOM elements than 3 slides. </li>



<li>Avoid adding multiple sliders or multiple interactive elements on the same page. </li>



<li>If you have an image or video gallery, add the minimum number of items that you can. </li>



<li>If you have a blog grid or list, limit the number of blog posts you&#8217;re showing and use pagination to display more. </li>



<li>Avoid the temptation to use every fancy feature that your page builder or theme provides. Parallax elements, carousels, animations, toggles, galleries etc will increase the DOM more than basic content, so be mindful of what you add to your page. </li>



<li></li>
</ul>



<h3 class="wp-block-heading">WordPress Duotone SVGs</h3>



<p>This is what I would call a micro-optimization. </p>



<p>WordPress adds some SVGs that are used for the Duotone filter feature: </p>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-15 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2023/07/duotone-svgs-wordpress.jpg"><img decoding="async" width="1024" height="453" data-id="5931" src="https://webtrainingwheels.com/wp-content/uploads/2023/07/duotone-svgs-wordpress-1024x453.jpg" alt="" class="wp-image-5931" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/07/duotone-svgs-wordpress-1024x453.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2023/07/duotone-svgs-wordpress-500x221.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2023/07/duotone-svgs-wordpress-768x340.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2023/07/duotone-svgs-wordpress-1536x679.jpg 1536w, https://webtrainingwheels.com/wp-content/uploads/2023/07/duotone-svgs-wordpress-2048x906.jpg 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://webtrainingwheels.com/wp-content/uploads/2023/07/svg-dom-analyzer.jpg"><img decoding="async" width="440" height="418" data-id="5930" src="https://webtrainingwheels.com/wp-content/uploads/2023/07/svg-dom-analyzer.jpg" alt="" class="wp-image-5930"/></a></figure>
</figure>



<p>These amount to about 80 DOM elements. Not huge, and not your starting point if your DOM size is massive. But if you really want to fine tune, you could remove these. </p>



<p>Just be sure your site isn&#8217;t actually using these styles :)</p>



<p>These DOM elements can be removed using the <a href="https://webtrainingwheels.com/recommends/perfmatters/" rel="nofollow">&#8220;Remove Global Styles&#8221; feature in the Perfmatters plugin</a> (affiliate link).</p>



<h2 class="wp-block-heading">Technical tips for developers</h2>



<p>If you are a developer and have access to the HTML of a site, or are building a theme, consider these recommendations.</p>



<h3 class="wp-block-heading">Make CSS as concise as possible &#8211; don&#8217;t use inline styles.</h3>



<p>Here you can see multiple inline styles &#8211; these nodes could be removed and the CSS added to one stylesheet, then also reused throughout the site.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="202" src="https://webtrainingwheels.com/wp-content/uploads/2023/07/inline-css-style-spans-1024x202.jpg" alt="" class="wp-image-5906" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/07/inline-css-style-spans-1024x202.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2023/07/inline-css-style-spans-500x99.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2023/07/inline-css-style-spans-768x152.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2023/07/inline-css-style-spans-1536x303.jpg 1536w, https://webtrainingwheels.com/wp-content/uploads/2023/07/inline-css-style-spans.jpg 1996w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h3 class="wp-block-heading">Use modern CSS</h3>



<ul class="wp-block-list">
<li>Using layout models like Flexbox or Grid will enable you to create more efficient layouts compared to using older methods like tables or floating divs.</li>



<li>Use CSS Pseudo-elements**: <code>::before</code> and <code>::after</code> can be used to add decorative elements without adding extra DOM elements.</li>
</ul>



<h3 class="wp-block-heading">Use content-visibility</h3>



<p>Above I showed the example of CSS <code>display:none</code> being used to hide elements for mobile and desktop. </p>



<p>Consider using <code><a href="https://css-tricks.com/almanac/properties/c/content-visibility/">content-visibility</a></code> instead. Using a value of <code>hidden</code> is similar to <code>display:none</code></p>



<p>And using <code>auto</code> will provide a kind of &#8220;lazy load&#8221; for HTML elements. WordPress plugins like LiteSpeed Cache and FlyingPress offer this so-called lazy rendering of HTML elements by using content-visibility. </p>



<p>When searching for ways to reduce the DOM size, you may come across some articles which claim that lazy rendering HTML does this. It does not. </p>



<p>The DOM elements are still present in the page, so the DOM size is <em>not</em> reduced. But it does improve the render time, thereby offsetting the performance issues of a large DOM. </p>



<p>So you may still see the warning in PageSpeed, but the loading metrics should be better.</p>



<h3 class="wp-block-heading">Use clean, semantic HTML</h3>



<p>When you use the correct HTML tags as they are intended, your code will be leaner and reduce the need for additional elements.</p>



<p>In this example you can see that each line item is its own list. </p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="545" src="https://webtrainingwheels.com/wp-content/uploads/2023/07/inefficient-lists-1024x545.jpg" alt="" class="wp-image-5905" srcset="https://webtrainingwheels.com/wp-content/uploads/2023/07/inefficient-lists-1024x545.jpg 1024w, https://webtrainingwheels.com/wp-content/uploads/2023/07/inefficient-lists-500x266.jpg 500w, https://webtrainingwheels.com/wp-content/uploads/2023/07/inefficient-lists-768x409.jpg 768w, https://webtrainingwheels.com/wp-content/uploads/2023/07/inefficient-lists-1536x818.jpg 1536w, https://webtrainingwheels.com/wp-content/uploads/2023/07/inefficient-lists-2048x1091.jpg 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Instead of making one list with several sub-items, this would have been more efficient and reduced the number of elements.</p>



<h3 class="wp-block-heading">Minimize the use of JavaScript </h3>



<p>There are tons of <a href="https://webtrainingwheels.com/remove-unused-javascript-in-wordpress/" data-type="post" data-id="4925">performance issues with JavaScript</a>. </p>



<p>As far as DOM size goes, JavaScript can be problematic because it can add a lot of DOM elements. So if you can implement a feature in CSS instead of JavaScript, do that!</p><div id="webtr-619993418" class="webtr-content">
                <div class='gf_browser_unknown gform_wrapper gform_legacy_markup_wrapper gform-theme--no-framework' data-form-theme='legacy' data-form-index='0' id='gform_wrapper_32' >
                        <div class='gform_heading'>
                            <h3 class="gform_title">Weekly WordPress Tips To Your Inbox</h3>
                        </div><form method='post' enctype='multipart/form-data'  id='gform_32'  action='/feed/' data-formid='32' novalidate> 
 <input type='hidden' class='gforms-pum' value='{"closepopup":false,"closedelay":0,"openpopup":false,"openpopup_id":0}' />
                        <div class='gform-body gform_body'><ul id='gform_fields_32' class='gform_fields top_label form_sublabel_below description_below validation_below'><li id="field_32_3" class="gfield gfield--type-honeypot gform_validation_container field_sublabel_below gfield--has-description field_description_below field_validation_below gfield_visibility_visible"  ><label class='gfield_label gform-field-label' for='input_32_3'>X/Twitter</label><div class='ginput_container'><input name='input_3' id='input_32_3' type='text' value='' autocomplete='new-password'/></div><div class='gfield_description' id='gfield_description_32_3'>This field is for validation purposes and should be left unchanged.</div></li><li id="field_32_1" class="gfield gfield--type-email gfield_contains_required field_sublabel_below gfield--no-description field_description_below field_validation_below gfield_visibility_visible"  ><label class='gfield_label gform-field-label screen-reader-text' for='input_32_1'>Enter Your Email, It&#039;s Free!<span class="gfield_required"><span class="gfield_required gfield_required_asterisk">*</span></span></label><div class='ginput_container ginput_container_email'>
                            <input name='input_1' id='input_32_1' type='email' value='' class='large'   placeholder='Enter Your Email, It&#039;s Free!' aria-required="true" aria-invalid="false"  />
                        </div></li><li id="field_32_2" class="gfield gfield--type-hidden gform_hidden field_sublabel_below gfield--no-description field_description_below field_validation_below gfield_visibility_visible"  ><div class='ginput_container ginput_container_text'><input name='input_2' id='input_32_2' type='hidden' class='gform_hidden'  aria-invalid="false" value='http://webtrainingwheels.com/feed/' /></div></li></ul></div>
        <div class='gform-footer gform_footer top_label'> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body><div class="gf-turnstile-container"> <div id="cf-turnstile-gf-32" class="cf-turnstile" data-callback="turnstileGravityCallback" data-sitekey="0x4AAAAAAA7A0N4QhHj7cf1O" data-theme="light" data-language="auto" data-size="normal" data-retry="auto" data-retry-interval="1000" data-refresh-expired="auto" data-action="gravity-form-32" data-appearance="always"></div> <style>.gform_button { pointer-events: none; opacity: 0.5; }</style> <script>document.addEventListener("DOMContentLoaded", function() { setTimeout(function(){ var e=document.getElementById("cf-turnstile-gf-32"); e&&!e.innerHTML.trim()&&(turnstile.remove("#cf-turnstile-gf-32"), turnstile.render("#cf-turnstile-gf-32", {sitekey:"0x4AAAAAAA7A0N4QhHj7cf1O"})); }, 100); });</script> <br class="cf-turnstile-br cf-turnstile-br-gf-32"> <style>#cf-turnstile-gf-32 { margin-left: -15px; }</style> </div> <style> .gf-turnstile-container { width: 100%; } .gform_footer.top_label { display: flex; flex-wrap: wrap; } </style> <script>document.addEventListener("DOMContentLoaded", function() {document.addEventListener('gform/post_render', function handlePostRender(event) {if (event.detail.formId !== 32) {return;}gform.utils.addAsyncFilter('gform/submission/pre_submission', async function handlePreSubmission(data) {document.addEventListener('gform/post_render', function rerenderTurnstile(event) {if (event.detail.formId !== 32) {return;}const turnstileElement = document.getElementById('cf-turnstile-gf-32');if (turnstileElement) {turnstile.remove('#cf-turnstile-gf-32');turnstile.render('#cf-turnstile-gf-32');}document.removeEventListener('gform/post_render', rerenderTurnstile);});gform.utils.removeFilter('gform/submission/pre_submission', handlePreSubmission);return data;});document.removeEventListener('gform/post_render', handlePostRender);});});</script><input type="submit" id="gform_submit_button_32" class="gform_button button" onclick="__gaTracker('send', 'event', { eventCategory: 'Forms', eventAction: 'Subscribe', eventLabel: 'PostFooter'});gform.submission.handleButtonClick(this);" data-submission-type="submit" value="Sign Up"></body></html>
 
            <input type='hidden' class='gform_hidden' name='gform_submission_method' data-js='gform_submission_method_32' value='postback' />
            <input type='hidden' class='gform_hidden' name='gform_theme' data-js='gform_theme_32' id='gform_theme_32' value='legacy' />
            <input type='hidden' class='gform_hidden' name='gform_style_settings' data-js='gform_style_settings_32' id='gform_style_settings_32' value='[]' />
            <input type='hidden' class='gform_hidden' name='is_submit_32' value='1' />
            <input type='hidden' class='gform_hidden' name='gform_submit' value='32' />
            
            <input type='hidden' class='gform_hidden' name='gform_currency' data-currency='USD' value='9JX4rQMsQLh9c59yxPWAG9GA97KoHVHRKrkMX6x/YlvriQLLi09Obd0DF0gXtvgBCFL9bF+fdS67GE2IHcyUS2oxGeIjvQnd1B/in2A0d8+thsk=' />
            <input type='hidden' class='gform_hidden' name='gform_unique_id' value='' />
            <input type='hidden' class='gform_hidden' name='state_32' value='WyJbXSIsIjNhZjRhZTc2ODU5NzRiOTg2YjVjODkwMzk3M2ZhNTE5Il0=' />
            <input type='hidden' autocomplete='off' class='gform_hidden' name='gform_target_page_number_32' id='gform_target_page_number_32' value='0' />
            <input type='hidden' autocomplete='off' class='gform_hidden' name='gform_source_page_number_32' id='gform_source_page_number_32' value='1' />
            <input type='hidden' name='gform_field_values' value='' />
            
        </div>
                        </form>
                        </div><script>
gform.initializeOnLoaded( function() {gformInitSpinner( 32, 'http://webtrainingwheels.com/wp-content/plugins/gravityforms/images/spinner.svg', true );jQuery('#gform_ajax_frame_32').on('load',function(){var contents = jQuery(this).contents().find('*').html();var is_postback = contents.indexOf('GF_AJAX_POSTBACK') >= 0;if(!is_postback){return;}var form_content = jQuery(this).contents().find('#gform_wrapper_32');var is_confirmation = jQuery(this).contents().find('#gform_confirmation_wrapper_32').length > 0;var is_redirect = contents.indexOf('gformRedirect(){') >= 0;var is_form = form_content.length > 0 && ! is_redirect && ! is_confirmation;var mt = parseInt(jQuery('html').css('margin-top'), 10) + parseInt(jQuery('body').css('margin-top'), 10) + 100;if(is_form){jQuery('#gform_wrapper_32').html(form_content.html());if(form_content.hasClass('gform_validation_error')){jQuery('#gform_wrapper_32').addClass('gform_validation_error');} else {jQuery('#gform_wrapper_32').removeClass('gform_validation_error');}setTimeout( function() { /* delay the scroll by 50 milliseconds to fix a bug in chrome */  }, 50 );if(window['gformInitDatepicker']) {gformInitDatepicker();}if(window['gformInitPriceFields']) {gformInitPriceFields();}var current_page = jQuery('#gform_source_page_number_32').val();gformInitSpinner( 32, 'http://webtrainingwheels.com/wp-content/plugins/gravityforms/images/spinner.svg', true );jQuery(document).trigger('gform_page_loaded', [32, current_page]);window['gf_submitting_32'] = false;}else if(!is_redirect){var confirmation_content = jQuery(this).contents().find('.GF_AJAX_POSTBACK').html();if(!confirmation_content){confirmation_content = contents;}jQuery('#gform_wrapper_32').replaceWith(confirmation_content);jQuery(document).trigger('gform_confirmation_loaded', [32]);window['gf_submitting_32'] = false;wp.a11y.speak(jQuery('#gform_confirmation_message_32').text());}else{jQuery('#gform_32').append(contents);if(window['gformRedirect']) {gformRedirect();}}jQuery(document).trigger("gform_pre_post_render", [{ formId: "32", currentPage: "current_page", abort: function() { this.preventDefault(); } }]);        if (event && event.defaultPrevented) {                return;        }        const gformWrapperDiv = document.getElementById( "gform_wrapper_32" );        if ( gformWrapperDiv ) {            const visibilitySpan = document.createElement( "span" );            visibilitySpan.id = "gform_visibility_test_32";            gformWrapperDiv.insertAdjacentElement( "afterend", visibilitySpan );        }        const visibilityTestDiv = document.getElementById( "gform_visibility_test_32" );        let postRenderFired = false;        function triggerPostRender() {            if ( postRenderFired ) {                return;            }            postRenderFired = true;            gform.core.triggerPostRenderEvents( 32, current_page );            if ( visibilityTestDiv ) {                visibilityTestDiv.parentNode.removeChild( visibilityTestDiv );            }        }        function debounce( func, wait, immediate ) {            var timeout;            return function() {                var context = this, args = arguments;                var later = function() {                    timeout = null;                    if ( !immediate ) func.apply( context, args );                };                var callNow = immediate && !timeout;                clearTimeout( timeout );                timeout = setTimeout( later, wait );                if ( callNow ) func.apply( context, args );            };        }        const debouncedTriggerPostRender = debounce( function() {            triggerPostRender();        }, 200 );        if ( visibilityTestDiv && visibilityTestDiv.offsetParent === null ) {            const observer = new MutationObserver( ( mutations ) => {                mutations.forEach( ( mutation ) => {                    if ( mutation.type === 'attributes' && visibilityTestDiv.offsetParent !== null ) {                        debouncedTriggerPostRender();                        observer.disconnect();                    }                });            });            observer.observe( document.body, {                attributes: true,                childList: false,                subtree: true,                attributeFilter: [ 'style', 'class' ],            });        } else {            triggerPostRender();        }    } );} );
</script>
</div>



<p></p>]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
