<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>ThemeShaper</title>
	<atom:link href="https://themeshaper.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://themeshaper.com</link>
	<description>Shaping WordPress themes since 2008.</description>
	<lastBuildDate>Fri, 14 Jun 2024 15:28:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>

<image>
	<url>https://themeshaper.com/wp-content/uploads/2024/04/themeshaper-icon-1.png?w=32</url>
	<title>ThemeShaper</title>
	<link>https://themeshaper.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">45531309</site><cloud domain='themeshaper.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<atom:link rel="search" type="application/opensearchdescription+xml" href="https://themeshaper.com/osd.xml" title="ThemeShaper" />
	<atom:link rel='hub' href='https://themeshaper.com/?pushpress=hub'/>
	<item>
		<title>How to add typographic fonts to WordPress block themes</title>
		<link>https://themeshaper.com/2022/11/28/how-to-add-typographic-fonts-to-wordpress-block-themes/</link>
					<comments>https://themeshaper.com/2022/11/28/how-to-add-typographic-fonts-to-wordpress-block-themes/#comments</comments>
		
		<dc:creator><![CDATA[Matias]]></dc:creator>
		<pubDate>Mon, 28 Nov 2022 18:47:29 +0000</pubDate>
				<category><![CDATA[Education]]></category>
		<category><![CDATA[Theme Development]]></category>
		<category><![CDATA[development]]></category>
		<guid isPermaLink="false">http://themeshaper.com/?p=8003</guid>

					<description><![CDATA[The easy and compliant way that every theme developer should know.]]></description>
										<content:encoded><![CDATA[
<p class="has-medium-font-size"><strong>TL;DR:</strong> Use the <a href="https://wordpress.org/plugins/create-block-theme/" target="_blank" rel="noreferrer noopener">Create Block Theme plugin</a> to bundle fonts in your theme with just a few clicks.</p>



<p>WordPress block themes allow you to add fonts to a theme by adding the font file assets to the theme folder and referencing them in the <code>theme.json</code>. Editing a JSON file manually does not deliver the best user experience. The good news is you can use the plugin to make this task much simpler without technical trade-offs.</p>



<p class="has-base-2-background-color has-background"><strong>Disclaimer:</strong> The plugin is for development only and is not intended for live production websites because it modifies the currently active theme. It was conceived as a tool to create new production-ready themes.</p>



<h2 class="wp-block-heading">Step by Step</h2>



<ol class="wp-block-list">
<li>Install the <a href="https://wordpress.org/plugins/create-block-theme/" target="_blank" rel="noreferrer noopener">Create Block Theme</a> plugin.</li>



<li>Activate the theme you want to manage.</li>



<li>Go to Appearance -&gt; Manage Theme Fonts.</li>



<li>Add/Remove the font faces you want.</li>
</ol>



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



<h3 class="wp-block-heading">How are the fonts bundled in my theme?</h3>



<p>The plugin stores the font assets in a sub-folder of your theme ( <code>&lt;your-current-theme&gt;/assets/fonts/</code> ) and adds font family definitions to your <code>theme.json</code> file. This is the case no matter if you upload a local font asset or use the Add Google Font option.</p>



<p>The plugin removes both the <code>theme.json</code> definition and the font assets if you remove a font face.</p>



<h3 class="wp-block-heading">How are the fonts enqueued?</h3>



<p>WordPress takes the font faces you added using the plugin, which are listed in your <code>theme.json</code>, and automatically converts them to CSS font face definitions which are included in the HTML page downloaded by the user browser.</p>



<h3 class="wp-block-heading">Will adding many fonts make my theme too heavy?</h3>



<p>Yes and no, or not necessarily. That can be counter-intuitive so let&#8217;s explore it in more detail.&nbsp;</p>



<p>WordPress references all the font files needed in your site CSS to let the browser know what font assets may need to download.<br><br>Even though WordPress references many fonts, modern browsers are optimized to only download the fonts that are used in the page being loaded. It is important to note that browsers calculate this considering just the current page loaded and not on a site-wide basis.<br><br>For example, if you include an ultra-thin variant of the Inter font family, but there is not a single element (ex: paragraphs, links, etc.) using Inter ultra-thin variant, the browser will not download this font asset. In this case, the performance penalty for including this font is nearly zero.</p>



<h3 class="wp-block-heading">Should I add a massive quantity of font faces to my theme &#8220;just in case&#8221;?</h3>



<p>No, both from a performance and design perspective, having a good font pair is always advisable over a proliferation of too many different fonts. Also, if the font is not in use, what&#8217;s the point of including it?</p>



<p>There is no magical number of font faces you can or should include. But usually, less is more. Sticking to the minimal quantity required to implement the aesthetics you are looking for is always a good idea.</p>



<h3 class="wp-block-heading">Can I include variable fonts in my theme?</h3>



<p>As with any other font file, you can add variable font assets using the &#8220;Add Local Font&#8221; option. The plugin will add the font definition and asset just like any other type of font. You can use it just like that or adjust more options related to variable fonts by editing the <code>theme.json</code> file.</p>



<h3 class="wp-block-heading">Is this solution GDPR compliant?</h3>



<p>Yes, because the plugin bundles the font files in your theme, and your WordPress instance will serve them. No third-party servers or tracking technologies are involved in serving the fonts to your users. You don&#8217;t need to request extra permissions from your users to include the fonts.</p>



<h2 class="wp-block-heading">More info</h2>



<p>Do you need a more detailed step-by-step guide? No worries! Check out this<a rel="noreferrer noopener" href="https://learn.wordpress.org/tutorial/streamline-your-block-theme-development-with-create-block-theme/" target="_blank"> great video tutorial about how to use the plugin</a>.</p>



<h2 class="wp-block-heading">Follow up</h2>



<p>Have any questions about fonts and themes? Ask in the comments!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themeshaper.com/2022/11/28/how-to-add-typographic-fonts-to-wordpress-block-themes/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">8003</post-id>
		<media:thumbnail url="https://themeshaper.com/wp-content/uploads/2022/11/fonts-post-image-3.jpg" />
		<media:content url="https://themeshaper.com/wp-content/uploads/2022/11/fonts-post-image-3.jpg" medium="image">
			<media:title type="html">fonts-post-image</media:title>
		</media:content>

		<media:content url="https://2.gravatar.com/avatar/b5dd3c2b94657a27476c5af82d15cbcca86f5e57c47947822e9810ffdd4ca0d0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">matiasbenedetto</media:title>
		</media:content>
	</item>
		<item>
		<title>Block Theme Building Tips</title>
		<link>https://themeshaper.com/2022/02/28/block-theme-building-tips/</link>
					<comments>https://themeshaper.com/2022/02/28/block-theme-building-tips/#comments</comments>
		
		<dc:creator><![CDATA[Ben Dwyer]]></dc:creator>
		<pubDate>Mon, 28 Feb 2022 17:48:47 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">http://themeshaper.com/?p=7953</guid>

					<description><![CDATA[When building block themes there is often more than one way to achieve the same thing. It&#8217;s often not clear which of these options is preferable. Below I outline some tips and guidelines that I find helpful. The guiding principle here is to remove as much complexity as possible from the theme; instead block themes [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>When building block themes there is often more than one way to achieve the same thing. It&#8217;s often not clear which of these options is preferable. Below I outline some tips and guidelines that I find helpful. The guiding principle here is to remove as much complexity as possible from the theme; instead block themes should be using the affordances provided by Gutenberg.</p>



<h2 class="wp-block-heading" id="1-avoid-using-css">1. Avoid using CSS</h2>



<p>As much as possible, block themes should avoid providing CSS. Gutenberg increasingly offers design tools which allow theme builder to control the design of the theme without using CSS. If it is not possible to achieve a particular design without CSS please create an issue for it on Gutenberg so we can consider adding a design tool to achieve the design.</p>



<h2 class="wp-block-heading" id="2-reuse-patterns-rather-than-implementing-custom-templates">2. Reuse patterns rather than implementing custom templates</h2>



<p>As the number of block themes we build grows we will have an ever increasing number of templates and template parts in each theme. In practice there are a small number of patterns which can be reused on many themes. We should be aiming to reuse existing patterns rather than implementing new templates. This means we need clever patterns which are able to reuse settings from theme.json.</p>



<h2 class="wp-block-heading" id="3-prefer-theme-json-to-block-settings">3. Prefer theme.json to block settings</h2>



<p>Connected to the point above, when we want to change the appearance of a block in a template or a pattern it is usually better to do so in the theme.json file than in the block template. This means that the design will be used for all instances of the block, not just the edited instance. It also keeps templates design agnostic, so that they be reused (see above).</p>



<p>What other tips do you have for building block themes?</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themeshaper.com/2022/02/28/block-theme-building-tips/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7953</post-id>
		<media:thumbnail url="https://themeshaper.com/wp-content/uploads/2022/02/blockthemetips-post-image.jpg" />
		<media:content url="https://themeshaper.com/wp-content/uploads/2022/02/blockthemetips-post-image.jpg" medium="image">
			<media:title type="html">blockthemetips-post-image</media:title>
		</media:content>

		<media:content url="https://0.gravatar.com/avatar/971b36b1bfbac08fbf93afce6f43fa4496d4f0a706bf55b3e1bd7741dccd1e07?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ben</media:title>
		</media:content>
	</item>
		<item>
		<title>Create A Blockbase Child Theme</title>
		<link>https://themeshaper.com/2021/11/17/create-a-blockbase-child-theme/</link>
					<comments>https://themeshaper.com/2021/11/17/create-a-blockbase-child-theme/#comments</comments>
		
		<dc:creator><![CDATA[Ben Dwyer]]></dc:creator>
		<pubDate>Wed, 17 Nov 2021 20:46:40 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">http://themeshaper.com/?p=7899</guid>

					<description><![CDATA[We have been working on a plugin to help you create a Blockbase child theme. The idea is that you can use the existing tools to make changes to a Blockbase theme, and then export a bundle of templates and theme.json as a new child theme. I tried to create a new theme called &#8220;Typewriter&#8221; [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>We have been working on a <a href="https://github.com/Automattic/create-blockbase-theme">plugin to help you create a Blockbase child theme</a>. The idea is that you can use the existing tools to make changes to a Blockbase theme, and then export a bundle of templates and theme.json as a new child theme.</p>



<p>I tried to create a new theme called &#8220;Typewriter&#8221; using these tools.</p>



<h2 class="wp-block-heading" id="step-1-setup">Step 1 &#8211; Setup</h2>



<p>Install and activate <a href="https://wordpress.org/themes/blockbase/">Blockbase</a> , and the <a href="https://github.com/Automattic/create-blockbase-theme">Create Blockbase Theme</a> plugin.</p>



<h2 class="wp-block-heading" id="step-2-global-styles">Step 2 &#8211; Global Styles</h2>



<p>Make changes to your site using the Global Styles editor. First I chose some new colors:</p>



<figure class="wp-block-image size-large"><img width="1024" height="566" data-attachment-id="7948" data-permalink="https://themeshaper.com/screenshot-2021-11-24-at-11-57-14/" data-orig-file="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-24-at-11.57.14.png" data-orig-size="2880,1592" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="screenshot-2021-11-24-at-11.57.14" data-image-description="" data-image-caption="" data-medium-file="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-24-at-11.57.14.png?w=300" data-large-file="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-24-at-11.57.14.png?w=1024" src="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-24-at-11.57.14.png?w=1024" alt="" class="wp-image-7948" srcset="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-24-at-11.57.14.png?w=1024 1024w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-24-at-11.57.14.png?w=2048 2048w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-24-at-11.57.14.png?w=150 150w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-24-at-11.57.14.png?w=300 300w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-24-at-11.57.14.png?w=768 768w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-24-at-11.57.14.png?w=1440 1440w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>You can also use the Global Styles editor to update Typography and Layout settings:</p>



<figure class="wp-block-image size-large"><img width="1024" height="566" data-attachment-id="7935" data-permalink="https://themeshaper.com/screenshot-2021-11-17-at-19-47-57/" data-orig-file="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-19.47.57.png" data-orig-size="2880,1594" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="screenshot-2021-11-17-at-19.47.57" data-image-description="" data-image-caption="" data-medium-file="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-19.47.57.png?w=300" data-large-file="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-19.47.57.png?w=1024" src="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-19.47.57.png?w=1024" alt="" class="wp-image-7935" srcset="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-19.47.57.png?w=1024 1024w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-19.47.57.png?w=2048 2048w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-19.47.57.png?w=150 150w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-19.47.57.png?w=300 300w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-19.47.57.png?w=768 768w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-19.47.57.png?w=1440 1440w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Then I changed the fonts, using the Customizer:</p>



<figure class="wp-block-image size-large"><img width="1024" height="566" data-attachment-id="7934" data-permalink="https://themeshaper.com/screenshot-2021-11-17-at-19-41-37/" data-orig-file="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-19.41.37.png" data-orig-size="2880,1594" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="screenshot-2021-11-17-at-19.41.37" data-image-description="" data-image-caption="" data-medium-file="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-19.41.37.png?w=300" data-large-file="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-19.41.37.png?w=1024" src="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-19.41.37.png?w=1024" alt="" class="wp-image-7934" srcset="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-19.41.37.png?w=1024 1024w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-19.41.37.png?w=2048 2048w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-19.41.37.png?w=150 150w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-19.41.37.png?w=300 300w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-19.41.37.png?w=768 768w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-19.41.37.png?w=1440 1440w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>I made all my changes using the Global Styles editor and the Customizer, but you might want to make more changes directly to the theme.json file after the theme is created.</p>



<h2 class="wp-block-heading" id="step-3-templates">Step 3 &#8211; Templates</h2>



<p>Edit your templates using the Site Editor:</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="566" data-attachment-id="7936" data-permalink="https://themeshaper.com/screenshot-2021-11-17-at-19-48-42/" data-orig-file="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-19.48.42.png" data-orig-size="2880,1594" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="screenshot-2021-11-17-at-19.48.42" data-image-description="" data-image-caption="" data-medium-file="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-19.48.42.png?w=300" data-large-file="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-19.48.42.png?w=1024" src="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-19.48.42.png?w=1024" alt="" class="wp-image-7936" srcset="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-19.48.42.png?w=1024 1024w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-19.48.42.png?w=2048 2048w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-19.48.42.png?w=150 150w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-19.48.42.png?w=300 300w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-19.48.42.png?w=768 768w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-19.48.42.png?w=1440 1440w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>I managed to achieve everything I needed to in this theme using the Site Editor, but for some things you might need to edit the template files directly once the theme is created.</p>



<h2 class="wp-block-heading" id="step-4-export">Step 4 &#8211; Export</h2>



<p>Under Appearance there will be a new page called &#8220;Create Blockbase Theme&#8221;:</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="982" height="1024" data-attachment-id="7937" data-permalink="https://themeshaper.com/screenshot-2021-11-17-at-20-28-40/" data-orig-file="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-20.28.40.png" data-orig-size="1528,1594" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="screenshot-2021-11-17-at-20.28.40" data-image-description="" data-image-caption="" data-medium-file="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-20.28.40.png?w=288" data-large-file="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-20.28.40.png?w=982" src="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-20.28.40.png?w=982" alt="" class="wp-image-7937" srcset="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-20.28.40.png?w=982 982w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-20.28.40.png?w=144 144w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-20.28.40.png?w=288 288w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-20.28.40.png?w=768 768w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-20.28.40.png?w=1440 1440w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-20.28.40.png 1528w" sizes="(max-width: 982px) 100vw, 982px" /></figure>



<p>You can add the details for the theme here. These will be used in the style.css file. When you click the &#8220;Create Blockbase Theme&#8221; button, a zip file will be downloaded, which contains all the files for your theme. Here&#8217;s mine:</p>



<div class="wp-block-file"><a id="wp-block-file--media-544bf6ba-76d4-4cb0-a9a6-2217ddb5c743" href="https://themeshaper.com/wp-content/uploads/2021/11/typewriter-2.zip">typewriter</a><a href="https://themeshaper.com/wp-content/uploads/2021/11/typewriter-2.zip" class="wp-block-file__button" download aria-describedby="wp-block-file--media-544bf6ba-76d4-4cb0-a9a6-2217ddb5c743">Download</a></div>



<h2 class="wp-block-heading" id="step-5-test">Step 5 &#8211; Test</h2>



<p>At this point you should have a zip file containing a working theme. You can upload this to your WordPress and activate it.</p>



<figure data-carousel-extra='{&quot;blog_id&quot;:45531309,&quot;permalink&quot;:&quot;https://themeshaper.com/2021/11/17/create-a-blockbase-child-theme/&quot;}'  class="wp-block-gallery columns-3 is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex"><ul class="blocks-gallery-grid"><li class="blocks-gallery-item"><figure><img loading="lazy" width="1024" height="566" data-attachment-id="7919" data-permalink="https://themeshaper.com/screenshot-2021-11-04-at-22-22-54/" data-orig-file="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-04-at-22.22.54.png" data-orig-size="2880,1594" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="screenshot-2021-11-04-at-22.22.54" data-image-description="" data-image-caption="" data-medium-file="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-04-at-22.22.54.png?w=300" data-large-file="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-04-at-22.22.54.png?w=1024" src="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-04-at-22.22.54.png?w=1024" alt="" data-id="7919" data-link="https://themeshaper.com/screenshot-2021-11-04-at-22-22-54/" class="wp-image-7919" srcset="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-04-at-22.22.54.png?w=1024 1024w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-04-at-22.22.54.png?w=2048 2048w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-04-at-22.22.54.png?w=150 150w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-04-at-22.22.54.png?w=300 300w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-04-at-22.22.54.png?w=768 768w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-04-at-22.22.54.png?w=1440 1440w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure></li><li class="blocks-gallery-item"><figure><img loading="lazy" width="1024" height="566" data-attachment-id="7918" data-permalink="https://themeshaper.com/screenshot-2021-11-04-at-22-23-11/" data-orig-file="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-04-at-22.23.11.png" data-orig-size="2880,1594" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="screenshot-2021-11-04-at-22.23.11" data-image-description="" data-image-caption="" data-medium-file="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-04-at-22.23.11.png?w=300" data-large-file="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-04-at-22.23.11.png?w=1024" src="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-04-at-22.23.11.png?w=1024" alt="" data-id="7918" data-link="https://themeshaper.com/screenshot-2021-11-04-at-22-23-11/" class="wp-image-7918" srcset="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-04-at-22.23.11.png?w=1024 1024w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-04-at-22.23.11.png?w=2048 2048w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-04-at-22.23.11.png?w=150 150w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-04-at-22.23.11.png?w=300 300w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-04-at-22.23.11.png?w=768 768w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-04-at-22.23.11.png?w=1440 1440w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure></li><li class="blocks-gallery-item"><figure><img loading="lazy" width="1024" height="566" data-attachment-id="7921" data-permalink="https://themeshaper.com/screenshot-2021-11-04-at-22-23-23/" data-orig-file="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-04-at-22.23.23.png" data-orig-size="2880,1594" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="screenshot-2021-11-04-at-22.23.23" data-image-description="" data-image-caption="" data-medium-file="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-04-at-22.23.23.png?w=300" data-large-file="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-04-at-22.23.23.png?w=1024" src="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-04-at-22.23.23.png?w=1024" alt="" data-id="7921" data-link="https://themeshaper.com/screenshot-2021-11-04-at-22-23-23/" class="wp-image-7921" srcset="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-04-at-22.23.23.png?w=1024 1024w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-04-at-22.23.23.png?w=2048 2048w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-04-at-22.23.23.png?w=150 150w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-04-at-22.23.23.png?w=300 300w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-04-at-22.23.23.png?w=768 768w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-04-at-22.23.23.png?w=1440 1440w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure></li></ul></figure>



<p>The theme contains an screenshot file, which you will need to update manually.</p>



<p>Now when you look at the frontend of your site it should look the same as it did before you activated the new theme. Here&#8217;s my new theme:</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="566" data-attachment-id="7943" data-permalink="https://themeshaper.com/screenshot-2021-11-17-at-20-37-47/" data-orig-file="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-20.37.47.png" data-orig-size="2880,1594" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="screenshot-2021-11-17-at-20.37.47" data-image-description="" data-image-caption="" data-medium-file="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-20.37.47.png?w=300" data-large-file="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-20.37.47.png?w=1024" src="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-20.37.47.png?w=1024" alt="" class="wp-image-7943" srcset="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-20.37.47.png?w=1024 1024w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-20.37.47.png?w=2048 2048w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-20.37.47.png?w=150 150w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-20.37.47.png?w=300 300w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-20.37.47.png?w=768 768w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-20.37.47.png?w=1440 1440w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="566" data-attachment-id="7944" data-permalink="https://themeshaper.com/screenshot-2021-11-17-at-20-38-03/" data-orig-file="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-20.38.03.png" data-orig-size="2880,1594" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="screenshot-2021-11-17-at-20.38.03" data-image-description="" data-image-caption="" data-medium-file="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-20.38.03.png?w=300" data-large-file="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-20.38.03.png?w=1024" src="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-20.38.03.png?w=1024" alt="" class="wp-image-7944" srcset="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-20.38.03.png?w=1024 1024w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-20.38.03.png?w=2048 2048w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-20.38.03.png?w=150 150w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-20.38.03.png?w=300 300w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-20.38.03.png?w=768 768w, https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-20.38.03.png?w=1440 1440w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading" id="further-changes">Further changes</h2>



<p>Once the theme has been created you can unzip the theme zip file and make further changes to the theme files. This might be necessary to make more advanced changes to the theme. You can:</p>



<ul class="wp-block-list"><li>Modify and add configuration in the theme.json file.</li><li>Update the html template files in <code>block-templates</code> and <code>block-template-parts</code></li><li>Add custom CSS to the file in <code>assets/theme.css</code></li></ul>



<h2 class="wp-block-heading" id="feedback">Feedback</h2>



<p>We&#8217;d love you to try this new tool and let us know how you get on in the comments!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themeshaper.com/2021/11/17/create-a-blockbase-child-theme/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7899</post-id>
		<media:content url="https://0.gravatar.com/avatar/971b36b1bfbac08fbf93afce6f43fa4496d4f0a706bf55b3e1bd7741dccd1e07?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ben</media:title>
		</media:content>

		<media:content url="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-24-at-11.57.14.png?w=1024" medium="image" />

		<media:content url="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-19.47.57.png?w=1024" medium="image" />

		<media:content url="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-19.41.37.png?w=1024" medium="image" />

		<media:content url="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-19.48.42.png?w=1024" medium="image" />

		<media:content url="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-20.28.40.png?w=982" medium="image" />

		<media:content url="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-04-at-22.22.54.png?w=1024" medium="image" />

		<media:content url="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-04-at-22.23.11.png?w=1024" medium="image" />

		<media:content url="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-04-at-22.23.23.png?w=1024" medium="image" />

		<media:content url="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-20.37.47.png?w=1024" medium="image" />

		<media:content url="https://themeshaper.com/wp-content/uploads/2021/11/screenshot-2021-11-17-at-20.38.03.png?w=1024" medium="image" />
	</item>
		<item>
		<title>Universal Themes</title>
		<link>https://themeshaper.com/2021/10/06/universal-themes/</link>
					<comments>https://themeshaper.com/2021/10/06/universal-themes/#comments</comments>
		
		<dc:creator><![CDATA[Ben Dwyer]]></dc:creator>
		<pubDate>Wed, 06 Oct 2021 10:51:34 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">http://themeshaper.com/?p=7879</guid>

					<description><![CDATA[Since our last post about Universal Themes we have fleshed out this idea and are using it to build all our themes. The Problem WordPress is introducing the Full Site Editor and with it new ways to build themes.&#160; These themes are called “Block” themes and integrate deeply with Gutenberg Blocks. These types of themes [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Since <a href="https://themeshaper.com/2021/06/23/universal-themes-some-ideas/">our last post about Universal Themes</a> we have fleshed out this idea and are using it to build all our themes.</p>



<h2 class="wp-block-heading">The Problem</h2>



<p>WordPress is introducing the Full Site Editor and with it new ways to build themes.&nbsp; These themes are called “Block” themes and integrate deeply with Gutenberg Blocks. These types of themes require the use of the new (and still in development) Full Site Editor.&nbsp;</p>



<p>The Site Editor is still being built, and block themes are in a nascent stage; they don’t yet offer the full gamut of features that will be available in the future. Block themes also require a very recent version of WordPress. How can we build themes which work with the classic dashboard to today and will continue to work with the Site Editor when it is more fully featured? This is the problem Universal themes are seeking to solve.</p>



<h2 class="wp-block-heading">What is a Universal Theme?</h2>



<p>Universal themes are an attempt to bridge the gap between the classic themes and block themes, by adding some layers to a block theme to make it work.</p>



<p>A Universal theme is a block theme that <em>can</em> use the Full Site Editor but can also be configured in a more classic way.&nbsp; That means that you can use classic WordPress tools, like the Customizer, Menus and Widgets dashboards as well as the Site Editor.</p>



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



<p>Block themes load templates from the <code>block-templates</code> directory. However classic themes load them from the root. To ensure that we don&#8217;t end up duplicating code and that users can move between the Classic Dashboard and the Site Editor, we use the function <code>gutenberg_block_template_part</code> inside our classic templates. For example <code>header.php</code>:</p>



<pre class="wp-block-code"><code>&lt;header class="wp-block-template-part"&gt;
	&lt;?php echo gutenberg_block_template_part( 'header' ); ?&gt;
&lt;/header&gt;</code></pre>



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



<p>Because block themes use html templates, its not possible to translate any copy inside them. In most cases we can avoid putting copy inside our templates, but there are some cases where it is impossible, for example the 404 page. </p>



<p>In these cases we are simply providing a classic template instead of a block template so that the strings can be translated. We can avoid any issues of code duplication by using the approach described above for templates. Here&#8217;s the 404.php from Blockbase:</p>



<pre class="wp-block-code"><code>&lt;?php
/**
 * The template for displaying 404 pages (not found)
 *
 * @package Blockbase
 * @since 1.1.1
 */
get_header();
?&gt;
	&lt;main class="container-404"&gt;
		&lt;h1 class="has-text-align-center has-medium-font-size"&gt;&lt;?php _e( 'Oops! That page can&amp;rsquo;t be found.', 'blockbase' ); ?&gt;&lt;/h1&gt;

		&lt;p&gt;&lt;?php _e( 'It looks like nothing was found at this location. Maybe try a search?', 'blockbase' ); ?&gt;&lt;/p&gt;

		&lt;?php echo do_blocks('&lt;!-- wp:search {"label":""} /--&gt;'); ?&gt;
	&lt;/main&gt;
&lt;?php
get_footer();</code></pre>



<h2 class="wp-block-heading">Fonts &amp; Colors</h2>



<p>Global Styles allows themes to customize their font and color options via theme.json. This gives universal themes a way to modify the fonts and colors in a theme, by modifying theme.json. In Blockbase we have attached some hooks to the font and color controls in the Customizer so that when you modify them the changes are made in theme.json. This gives us a single source of truth for these settings.</p>



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



<p>We have created a universal theme called Blockbase, which can be used as a parent theme; any child themes created with Blockbase will automatically be universal themes. You can <a href="http://blockbasetheme.com">learn more about Blockbase at blockbasetheme.com</a>.</p>



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



<p>Universal themes are a temporary measure. As the Site Editor continues to improve and more features are added, the need for universal themes will diminish. These wrappers will be made obsolete and in time universal themes will become block themes.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themeshaper.com/2021/10/06/universal-themes/feed/</wfw:commentRss>
			<slash:comments>12</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7879</post-id>
		<media:content url="https://0.gravatar.com/avatar/971b36b1bfbac08fbf93afce6f43fa4496d4f0a706bf55b3e1bd7741dccd1e07?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ben</media:title>
		</media:content>
	</item>
		<item>
		<title>Resources for block theme development</title>
		<link>https://themeshaper.com/2021/07/13/resources-for-block-theme-development/</link>
					<comments>https://themeshaper.com/2021/07/13/resources-for-block-theme-development/#comments</comments>
		
		<dc:creator><![CDATA[Anne McCarthy]]></dc:creator>
		<pubDate>Tue, 13 Jul 2021 17:44:26 +0000</pubDate>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Theme Development]]></category>
		<category><![CDATA[Theme Tips]]></category>
		<category><![CDATA[Block-based Themes]]></category>
		<category><![CDATA[Full-site Editing]]></category>
		<category><![CDATA[Gutenberg]]></category>
		<category><![CDATA[resources]]></category>
		<category><![CDATA[themes]]></category>
		<guid isPermaLink="false">http://themeshaper.com/?p=7869</guid>

					<description><![CDATA[With WordPress 5.8 launching on July 20th, it seems like a great time to round up some resources to help theme authors prepare for the future. By now, you’ve probably heard about block themes and the upcoming future of full site editing. Perhaps you have even begun to explore creating a block theme or adapting [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>With WordPress 5.8 launching on July 20th, it seems like a great time to round up some resources to help theme authors prepare for the future. By now, you’ve probably heard about block themes and the upcoming future of full site editing. Perhaps you have even begun to explore creating a block theme or adapting your current theme to some of the new features, like <a href="https://make.wordpress.org/core/2021/06/16/introducing-the-template-editor-in-wordpress-5-8/">template editing mode</a>. Whether you’re just starting out or already deep in the block theme world, the following resources should help you be aware of what’s to come and how to get involved in shaping the future.<strong> </strong>If you’re looking for a quick snapshot, it’s recommended to review the following for 5.8:&nbsp;</p>



<ul class="wp-block-list"><li>Review the <a href="https://make.wordpress.org/themes/2021/07/08/summary-theme-features-in-wordpress-5-8/">Make Themes summary of theme features in 5.8</a>.</li><li>Read the Dev Notes on <a href="https://make.wordpress.org/core/2021/06/25/introducing-theme-json-in-wordpress-5-8/">introducing theme.json</a> and <a href="https://make.wordpress.org/core/2021/06/29/on-layout-and-content-width-in-wordpress-5-8/">layout and content width</a> for more specifics about block theme updates.&nbsp;</li><li>Check out <a href="https://github.com/WordPress/gutenberg/issues/33094">an updated scope of remaining site editing projects</a> to get a sense of what’s to come beyond 5.8.&nbsp;</li></ul>



<p><strong>Curate your information</strong></p>



<p>Since block themes are currently evolving along with the features to support them, it’s helpful to start by figuring out what will help you stay up to date with the latest happenings, as that makes sense for you. Here are a few options:</p>



<ul class="wp-block-list"><li>Check out a <a href="https://make.wordpress.org/core/2020/05/20/ways-to-keep-up-with-full-site-editing-fse/">summary of ways to keep up with full site editing</a> to choose your own adventure.  </li><li>Read the <a href="https://href.li/?https://make.wordpress.org/themes/tags/gutenberg-themes-roundup/">Gutenberg + Themes Roundups</a> to get the latest &amp; greatest information for anything cutting edge.</li><li>Join the <a href="https://make.wordpress.org/themes/tags/block-based-meeting/">monthly Block theme meeting</a> to discuss block themes, ask questions, give feedback, etc. </li></ul>



<p><strong>Dive into resources</strong></p>



<p>Outside of knowing the latest, it helps to know what the best practices are to follow. The following should give you great places to start:&nbsp;</p>



<ul class="wp-block-list"><li><a href="https://href.li/?https://developer.wordpress.org/block-editor/how-to-guides/themes/block-theme-overview/">Block Theme Documentation</a> is currently outlined with a Learn WordPress course planned and a discussion underway <a href="https://github.com/WordPress/gutenberg/issues/31999">about future documentation</a>.</li><li>Carolina Nymark created <a href="https://fullsiteediting.com/">fullsiteediting.com</a> that walks you through how to set up a block theme.&nbsp;</li><li><a href="https://themeshaper.com/tag/block-based-themes/">Review the current posts on this very site</a> focused on all things block theme building.&nbsp;</li></ul>



<p><strong>Learn from and with others</strong></p>



<p>Since this is an area that folks across the WordPress community are diving into, there are some fantastic ways to keep in touch with what others are experimenting with, how they are solving problems, how they are getting started, and more. Especially during a time where we can’t meet up and look over someone’s shoulder at a WordCamp, hopefully these resources help bridge that divide even a tiny bit.&nbsp;</p>



<ul class="wp-block-list"><li>Check out the <a href="https://href.li/?https://github.com/WordPress/theme-experiments">Theme Experiments Repo</a> to see what others are building/doing to get started. You can even quickly create a blank theme to get started using resources within that repo.&nbsp;</li><li>Review previous demos/walk throughs: Marcus has some <a href="https://www.youtube.com/channel/UC9jhz4YFzX9UOVYPqKu0pFg/videos">great block theme videos to check out</a> that show him learning as he goes &amp; Helen has a <a href="https://www.youtube.com/watch?v=EAffbbbDk40&amp;t=2s">3-hour long video of her doing the same</a>.&nbsp;</li><li>There was a recent hallway hangout <a href="https://make.wordpress.org/themes/2021/05/10/friday-may-14th-at-14utc/">around the concept of Universal themes</a> that might be of interest to view, especially if you’re a theme shop. <a href="https://themeshaper.com/2021/06/23/universal-themes-some-ideas/">Here’s a write up about the concept as well</a>.</li><li>If you’re keen to help explore and give feedback on theme.json, there’s a <a href="https://make.wordpress.org/test/2021/06/24/call-for-testing-thrive-with-theme-json/">call for testing with the FSE Outreach Program that you can follow</a> along with a <a href="https://www.youtube.com/watch?v=8VZHPufDUgQ">recording of a great hallway hangout about theme.json</a> and the test itself.&nbsp;</li></ul>



<hr class="wp-block-separator" />



<p>While these are the resources we found most useful, we’d love to hear from you too. What resources have been helpful for you to explore block themes and the various pathways leading up to full site editing? Share in the comments so we can all learn together.&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themeshaper.com/2021/07/13/resources-for-block-theme-development/feed/</wfw:commentRss>
			<slash:comments>8</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7869</post-id>
		<media:thumbnail url="https://themeshaper.com/wp-content/uploads/2021/07/screen-shot-2021-07-13-at-11.30.19-am.png" />
		<media:content url="https://themeshaper.com/wp-content/uploads/2021/07/screen-shot-2021-07-13-at-11.30.19-am.png" medium="image">
			<media:title type="html">Screen Shot 2021-07-13 at 11.30.19 AM</media:title>
		</media:content>

		<media:content url="https://2.gravatar.com/avatar/ef404e1b077c57a607bec302b165e154413151ec26b899396b8d91fba66e470e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">annezazu</media:title>
		</media:content>
	</item>
		<item>
		<title>Universal Themes: Customization</title>
		<link>https://themeshaper.com/2021/07/12/universal-themes-customization/</link>
		
		<dc:creator><![CDATA[Ben Dwyer]]></dc:creator>
		<pubDate>Mon, 12 Jul 2021 09:36:31 +0000</pubDate>
				<category><![CDATA[Theme Development]]></category>
		<category><![CDATA[Block-based Themes]]></category>
		<category><![CDATA[customizer]]></category>
		<category><![CDATA[Full-site Editing]]></category>
		<guid isPermaLink="false">http://themeshaper.com/?p=7841</guid>

					<description><![CDATA[Making Global Styles and the Customizer work together]]></description>
										<content:encoded><![CDATA[
<p>In <a href="https://themeshaper.com/2021/06/23/universal-themes-some-ideas/">the last post</a> we shared the idea of a &#8220;universal&#8221; theme. This post looks at how we can use classic WordPress tools (in this case the Customizer) to customize a block theme, while saving these changes in Global Styles &#8211; making a universal theme!</p>



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



<p>Block themes use a theme.json file to define many aspects of the theme, e.g. color palettes and typography. Gutenberg provides a tool to edit these settings (called Global Styles). When a user changes these values in the Global Styles UI, the changes are not saved back into the theme.json file but instead are saved to a Custom Post Type (CPT) in WordPress. Because this CPT can be modified using WordPress APIs, this gives us the power to make changes to Global Styles without relying on the interface in Gutenberg.</p>



<p>This simple idea is the basis for the color and typography customization options we have added to our universal theme Blockbase. The rest is just implementation details…</p>



<h2 class="wp-block-heading">Implementation details!</h2>



<p>When the Customizer loads, we create two new sections:</p>



<ol class="wp-block-list"><li>Colors</li><li>Fonts</li></ol>



<pre class="wp-block-code"><code>$wp_customize-&gt;add_section(
	'customize-global-styles-colors',
	array(
		'capability'  =&gt; 'edit_theme_options',
		'description' =&gt; sprintf( __( 'Color Customization for %1$s', 'blockbase' ), $theme-&gt;name ),
		'title'       =&gt; __( 'Colors', 'blockbase' ),
	)
);</code></pre>



<pre class="wp-block-code"><code>$wp_customize-&gt;add_section(
	'customize-global-styles-fonts',
	array(
		'capability'  =&gt; 'edit_theme_options',
		'description' =&gt; sprintf( __( 'Font Customization for %1$s', 'blockbase' ), $theme-&gt;name ),
		'title'       =&gt; __( 'Fonts', 'blockbase' ),
	)
);</code></pre>



<p>In each of these sections we create new settings and controls &#8211; each setting and control relates to a color/font option in Global Styles. We read the content of the theme.json file and use this to populate the settings in the Customizer. There is a helpful function in Gutenberg which merges together the theme.json settings with any user settings:</p>



<pre class="wp-block-code"><code>WP_Theme_JSON_Resolver_Gutenberg::get_merged_data()-&gt;get_raw_data();</code></pre>



<p>We read in an array of color palettes from the theme.json file and display these inside the &#8220;Colors&#8221; section:</p>



<figure data-carousel-extra='{&quot;blog_id&quot;:45531309,&quot;permalink&quot;:&quot;https://themeshaper.com/2021/07/12/universal-themes-customization/&quot;}'  class="wp-block-gallery columns-2 is-cropped wp-block-gallery-2 is-layout-flex wp-block-gallery-is-layout-flex"><ul class="blocks-gallery-grid"><li class="blocks-gallery-item"><figure><img loading="lazy" width="388" height="1023" data-attachment-id="7850" data-permalink="https://themeshaper.com/screenshot-2021-07-12-at-09-53-31/" data-orig-file="https://themeshaper.com/wp-content/uploads/2021/07/screenshot-2021-07-12-at-09.53.31.png" data-orig-size="604,1594" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="screenshot-2021-07-12-at-09.53.31" data-image-description="" data-image-caption="" data-medium-file="https://themeshaper.com/wp-content/uploads/2021/07/screenshot-2021-07-12-at-09.53.31.png?w=114" data-large-file="https://themeshaper.com/wp-content/uploads/2021/07/screenshot-2021-07-12-at-09.53.31.png?w=388" src="https://themeshaper.com/wp-content/uploads/2021/07/screenshot-2021-07-12-at-09.53.31.png?w=388" alt="" data-id="7850" data-link="https://themeshaper.com/screenshot-2021-07-12-at-09-53-31/" class="wp-image-7850" srcset="https://themeshaper.com/wp-content/uploads/2021/07/screenshot-2021-07-12-at-09.53.31.png?w=388 388w, https://themeshaper.com/wp-content/uploads/2021/07/screenshot-2021-07-12-at-09.53.31.png?w=57 57w, https://themeshaper.com/wp-content/uploads/2021/07/screenshot-2021-07-12-at-09.53.31.png?w=114 114w, https://themeshaper.com/wp-content/uploads/2021/07/screenshot-2021-07-12-at-09.53.31.png 604w" sizes="(max-width: 388px) 100vw, 388px" /></figure></li><li class="blocks-gallery-item"><figure><img loading="lazy" width="387" height="1023" data-attachment-id="7852" data-permalink="https://themeshaper.com/screenshot-2021-07-12-at-09-54-34/" data-orig-file="https://themeshaper.com/wp-content/uploads/2021/07/screenshot-2021-07-12-at-09.54.34.png" data-orig-size="602,1592" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="screenshot-2021-07-12-at-09.54.34" data-image-description="" data-image-caption="" data-medium-file="https://themeshaper.com/wp-content/uploads/2021/07/screenshot-2021-07-12-at-09.54.34.png?w=113" data-large-file="https://themeshaper.com/wp-content/uploads/2021/07/screenshot-2021-07-12-at-09.54.34.png?w=387" src="https://themeshaper.com/wp-content/uploads/2021/07/screenshot-2021-07-12-at-09.54.34.png?w=387" alt="" data-id="7852" data-link="https://themeshaper.com/screenshot-2021-07-12-at-09-54-34/" class="wp-image-7852" srcset="https://themeshaper.com/wp-content/uploads/2021/07/screenshot-2021-07-12-at-09.54.34.png?w=387 387w, https://themeshaper.com/wp-content/uploads/2021/07/screenshot-2021-07-12-at-09.54.34.png?w=57 57w, https://themeshaper.com/wp-content/uploads/2021/07/screenshot-2021-07-12-at-09.54.34.png?w=113 113w, https://themeshaper.com/wp-content/uploads/2021/07/screenshot-2021-07-12-at-09.54.34.png 602w" sizes="(max-width: 387px) 100vw, 387px" /></figure></li></ul></figure>



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



<p>One of the powers of Global Styles is that it relies on CSS variables. This makes it very easy for us to update the Customizer preview when the controls are changed. Some simple javascript injects new values for these CSS variables into the page, meaning that the preview updates instantly.</p>



<p>First we bind a listener to the control:</p>



<pre class="wp-block-code"><code>// For each of the palette items add a listener
userColorPalette.forEach( ( paletteItem ) =&gt; {
	const settingName = userColorSectionKey + paletteItem.slug;
	wp.customize( settingName, ( value ) =&gt; {
		value.bind( ( newValue ) =&gt; {
			paletteItem.color = newValue;
			blockBaseUpdateColorsPreview( userColorPalette );
		} );
	} );
} );</code></pre>



<p>This updates the global variable <code>userColorPalette</code>, which we then use to create our CSS variables:</p>



<pre class="wp-block-code"><code>function blockBaseUpdateColorsPreview( palette ) {
	// build the CSS variables to inject
	let innerHTML = ':root,body{';
	palette.forEach( ( paletteItem ) =&gt; {
		innerHTML += `--wp--preset--color--${ paletteItem.slug }:${ paletteItem.color };`;
	} );
	innerHTML += ';}';

	// inject them into the body
	const styleElement = document.getElementById(
		'global-styles-colors-customizations-inline-css'
	);
	styleElement.innerHTML = innerHTML;
}</code></pre>



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



<p>Customizer settings are usually saved in a site option or a theme mod. Since we are building a universal theme, we need to save these changes into Global Styles so that they are reflected in the Site Editor. The easiest way we found to achieve this was to hook into the <code>customize_save_after</code> action, read the settings from the controls, and then update the Global Styles CPT with the new settings. This code is used to get and read the CPT:</p>



<pre class="wp-block-code"><code>WP_Theme_JSON_Resolver_Gutenberg::get_user_custom_post_type_id();
get_post( $user_custom_post_type_id );
json_decode( $user_theme_json_post-&gt;post_content );</code></pre>



<p>Once you have the CPT in JSON form it&#8217;s simply a case of adding the new settings to it, and saving them back into the CPT:</p>



<pre class="wp-block-code"><code>$user_theme_json_post_content-&gt;settings-&gt;color-&gt;palette = $this-&gt;user_color_palette;

wp_update_post( json_encode( $user_theme_json_post_content ) );</code></pre>



<h2 class="wp-block-heading">Color Palettes</h2>



<p>Color palettes are simply combination of color settings. When a user selects a palette we simply change all of the associated colors at once. This can be done with the Javascript API:</p>



<pre class="wp-block-code"><code>wp.customize.control( userColorSectionKey ).setting.set( color );</code></pre>



<h2 class="wp-block-heading">How can I use this?</h2>



<p>The code above is just pseudo code, to explain the concepts. For a fully working example see Blockbase freely available in our <a href="https://github.com/Automattic/themes/tree/trunk/blockbase">free themes repository</a>. This code has a GPL license and can therefore be copied and distributed freely.</p>



<p>However, if you are interested in building a universal theme I would  encourage you to use Blockbase as a parent theme. This will mean you get all future improvements to your theme for free!</p>



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



<p>The Customizer gets a bad rap, and it&#8217;s true that it is clunky when compared to the direct manipulation that is possible with Gutenberg. Nevertheless, building these kinds of tools to update Global Styles without the framework of the Customizer would have been much more involved. There is some satisfaction in being able to take advantage of all the hard work that has gone into the Customizer in its final years!</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7841</post-id>
		<media:thumbnail url="https://themeshaper.com/wp-content/uploads/2021/07/frame-1.png" />
		<media:content url="https://themeshaper.com/wp-content/uploads/2021/07/frame-1.png" medium="image">
			<media:title type="html">Frame 1</media:title>
		</media:content>

		<media:content url="https://0.gravatar.com/avatar/971b36b1bfbac08fbf93afce6f43fa4496d4f0a706bf55b3e1bd7741dccd1e07?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ben</media:title>
		</media:content>

		<media:content url="https://themeshaper.com/wp-content/uploads/2021/07/screenshot-2021-07-12-at-09.53.31.png?w=388" medium="image" />

		<media:content url="https://themeshaper.com/wp-content/uploads/2021/07/screenshot-2021-07-12-at-09.54.34.png?w=387" medium="image" />
	</item>
		<item>
		<title>Theme patterns for the Site Editor</title>
		<link>https://themeshaper.com/2021/06/25/theme-patterns-for-the-site-editor/</link>
		
		<dc:creator><![CDATA[Kjell Reigstad]]></dc:creator>
		<pubDate>Fri, 25 Jun 2021 19:40:17 +0000</pubDate>
				<category><![CDATA[Theme Development]]></category>
		<category><![CDATA[Themes]]></category>
		<category><![CDATA[Block-based Themes]]></category>
		<category><![CDATA[Patterns]]></category>
		<guid isPermaLink="false">http://themeshaper.com/?p=7792</guid>

					<description><![CDATA[Learn how to use Template Part and Query Loop patterns to provide users with more design options.]]></description>
										<content:encoded><![CDATA[
<p>We&#8217;ve been <a href="https://themeshaper.com/2020/04/08/adding-block-patterns-to-your-theme/">bundling block patterns</a> with all of our themes for quite a while now, but recent improvements to the Template Part and Query Loop blocks has opened up a whole new world for how patterns can be used.  </p>



<p>Both blocks can now display a carousel of block patterns in their setup state, allowing users to choose between a menu of pre-designed versions of these blocks. These patterns can be bundled with your theme, so that users have a wide range of pre-designed header, query, and footer options available to choose from in the Site Editor:</p>



<figure class="wp-block-video wp-block-embed is-type-video is-provider-videopress wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe title='VideoPress Video Player' aria-label='VideoPress Video Player' width='500' height='280' src='https://video.wordpress.com/embed/lIGHIF8y?preloadContent=metadata&amp;hd=0&amp;cover=1' frameborder='0' allowfullscreen  allow='clipboard-write' ></iframe><script src='https://v0.wordpress.com/js/next/videopress-iframe.js?m=1739540970'></script>
</div></figure>



<p>The only difference between these and other patterns you&#8217;d build is that they include a special <code>blockTypes</code> property to let Gutenberg know which block to associate them with. Here&#8217;s a simplified example: </p>



<pre class="wp-block-code"><code>register_block_pattern(
	'theme/pattern-slug',
	array(
		'title'       =&gt; _x( 'Pattern Title' 'theme-slug' ),
		'blockTypes'  =&gt; array( 'core/template-part/header' ),
		'content'     =&gt; '&lt;!-- Your Pattern Markup --&gt;'
	)
);</code></pre>



<p>The markup above specifies that this pattern should be surfaced for a Header template part block. The value there would <code>core/template-part/footer</code> or <code>core/query</code> if you were designing a pattern for those blocks instead. (This property also powers <a href="https://make.wordpress.org/core/2021/05/20/core-editor-improvement-contextual-patterns-for-easier-creation/">pattern transforms</a>, but that&#8217;s a topic for another time). </p>



<p>Once you register a pattern that way, it will show up in the carousel for the specified block. It&#8217;s as simple as that!</p>



<p>There are already a few Query Loop patterns <a href="https://github.com/WordPress/gutenberg/blob/6a3c3b72895162158870e3e000c5529d56135c95/lib/block-patterns.php#L18-L146">bundled with Core today</a> that use this method, and the header patterns shown in the video above are actually from <a href="https://github.com/WordPress/gutenberg/pull/31610">a Gutenberg PR I&#8217;m working on as well</a>. I&#8217;ve prepared a quick code example using our in-progress <a href="https://github.com/Automattic/themes/tree/trunk/quadrat">Quadrat theme</a> to show how they could be bundled — we definitely plan on including a handful of these sorts of patterns in our block themes moving forward. </p>



<p><a href="https://github.com/Automattic/themes/pull/4104">https://github.com/Automattic/themes/pull/4104</a></p>



<p>When combined together, Header, Query Loop, and Footer patterns allow you to mix-and-match pre-designed sections to create your entire website. I&#8217;m truly excited to see not only how themes use this feature, but how the Pattern Directory might provide hundreds more options for these blocks. This feels groundbreaking for WordPress, and I can&#8217;t wait to see how it turns out. </p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7792</post-id>
		<media:thumbnail url="https://themeshaper.com/wp-content/uploads/2021/06/quadrat-header.jpg" />
		<media:content url="https://themeshaper.com/wp-content/uploads/2021/06/quadrat-header.jpg" medium="image">
			<media:title type="html">quadrat-header</media:title>
		</media:content>

		<media:content url="https://2.gravatar.com/avatar/ee57ce5b9145a3c9921a755fbd2cf54c5dba759210d9b2d8b1310edf1bb87111?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kjellreigstad</media:title>
		</media:content>
	</item>
		<item>
		<title>Universal themes: Some ideas</title>
		<link>https://themeshaper.com/2021/06/23/universal-themes-some-ideas/</link>
					<comments>https://themeshaper.com/2021/06/23/universal-themes-some-ideas/#comments</comments>
		
		<dc:creator><![CDATA[Ben Dwyer]]></dc:creator>
		<pubDate>Wed, 23 Jun 2021 10:35:30 +0000</pubDate>
				<category><![CDATA[Theme Development]]></category>
		<category><![CDATA[Block-based Themes]]></category>
		<category><![CDATA[customizer]]></category>
		<category><![CDATA[Full-site Editing]]></category>
		<guid isPermaLink="false">http://themeshaper.com/?p=7783</guid>

					<description><![CDATA[With the Full Site Editing project well underway, theme developers need to be thinking about what the future holds for themes.&#160; Why block themes? To take advantage of the Site Editor, themes need to be built out of blocks &#8211; this is why we need block themes. Block themes are an entirely new way of [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>With the Full Site Editing project well underway, theme developers need to be thinking about what the future holds for themes.&nbsp;</p>



<h1 class="wp-block-heading">Why block themes?</h1>



<p>To take advantage of the Site Editor, themes need to be built out of blocks &#8211; this is why we need block themes. Block themes are an entirely new way of creating themes. Classic themes bundle all of the code needed to control the presentation and functionality of the site, with the theme itself. This often means that themes contain extra code to add features (e.g. a slideshow) as well CSS to control the layout.</p>



<p>With block themes, much of the theme&#8217;s functionality and presentation is provided by Gutenberg. This means that themes have a shared set of features and style rules, which brings several benefits for users:</p>



<ol class="wp-block-list"><li>The user experience for customising themes is more consistent.</li><li>When users switch themes, they won’t lose features, as Gutenberg provides the same features to all themes.</li><li>Users can mix and match aspects of different themes &#8211; e.g. the header of one theme with the footer of another.</li></ol>



<p>There are also some benefits for developers:</p>



<ol class="wp-block-list"><li>Less code is needed to build a highly functioning theme.</li><li>Features that are used by many themes are now provided by the community, so that everyone benefits from the work done to maintain and improve them.</li></ol>



<h1 class="wp-block-heading">Can I use block themes today?</h1>



<p>Block themes are the future and they will provide users great tools when Full Site Editing launches. For now, only those who are running the latest Gutenberg plugin and are willing to use experimental features like the Site Editor are able to use block themes.</p>



<p>Although the Site Editor is not yet ready, many aspects Full Site Editing will be available in WordPress 5.8. There is an opportunity to start building some form of block themes before Site Editor is ready.</p>



<h2 class="wp-block-heading">Two editing modes</h2>



<p>Full Site Editing brings a new editing mode for themes. For the sake of this article we&#8217;ll call the current editing mode,  &#8220;classic&#8221; (Site Editor disabled) and  the Full Site Editing mode, &#8220;FSE&#8221; mode (Site Editor enabled).</p>



<p>Users with classic themes will (probably) need to switch themes if they want to start using the Full Site Editing features. However if we can build block themes in a way that works in &#8220;classic&#8221; mode, then users will be able to take advantage of Full Site Editing once the tools are available. We have been calling themes like this &#8220;universal&#8221; themes.</p>



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



<p>The vision for universal themes is that a user could create a site using WordPress without the Site Editor enabled. Then, when the Site Editor is more mature, users could switch to using that, with all the extra tools that Full Site Editing will bring.&nbsp;</p>



<p>A universal theme would work in both editing modes.&nbsp; A user should be able to build a site in classic mode and switch to FSE mode when the Site Editor is more mature or when they are ready to try all the extra tools that Full Site Editing will bring. Changes to a theme in classic mode should be reflected when I enable the Site Editor.</p>



<p class="has-light-gray-background-color has-background has-small-font-size">Side note: It is not expected that users would toggle between these two modes. The plan will be for everyone to migrate to the Site Editor at some point. The intention of universal themes is to allow people to easily migrate from classic to FSE, not to encourage switching between them.</p>



<h2 class="wp-block-heading">Future-proof</h2>



<p>We that  know that the Site Editor is coming. Building themes in this way will allow users to transition from classic themes to block themes when they are ready without requiring them to switch themes.</p>



<p>To achieve this we need to consider several aspects of themes:</p>



<ul class="wp-block-list"><li><a href="#templates">Templates</a></li><li><a href="#navigation">Navigation</a></li><li><a href="#customization">Customization</a></li></ul>



<h3 class="wp-block-heading" id="templates">Templates</h3>



<p>In classic themes, templates live in the root directory and, by convention, `template-parts`. In block themes they live in `block-templates` and, by convention, `block-template-parts`. We could build templates for both classic and block themes and put them in the respective directories but the problem with this approach is that if users make changes to their templates when in classic mode they will not be reflected if they switch to the Site Editor.</p>



<p>To use the same templates when in classic and FSE mode we can put our templates in the `block-template-parts` directory. We can include them in our block templates in our template file like this:</p>



<pre class="wp-block-code"><code>block-templates/page.html:

&lt;!-- wp:template-part {"slug":"page"} --&gt;</code></pre>



<p>For classic templates we can include the same file using `gutenberg_block_template_part`, which will execute `do_blocks` on this template:</p>



<pre class="wp-block-code"><code>/page.php:

echo gutenberg_block_template_part( 'page' );</code></pre>



<p>This approach means that users can switch from classic to FSE mode without losing their changes.</p>



<h3 class="wp-block-heading" id="navigation">Navigation</h3>



<p>Classic themes use `wp_nav_menu` to render theme navigation elements, which can be customised in the Dashboard, or in the Customizer. On the other hand, Block themes rely on the Navigation block to display their navigation. A <a href="https://github.com/WordPress/gutenberg/pull/32491">recent change</a> to the Navigation block means that we can connect these interfaces together:</p>



<p>By passing the navigation block an `__unstableLocation` attribute with the location of the classic menu, we can display classic menus inside the Navigation block:</p>



<pre class="wp-block-code"><code>&lt;!-- wp:navigation {"__unstableLocation":"primary"} --&gt;&lt;!-- /wp:navigation --&gt;</code></pre>



<p>This allows us to edit menus in the Customizer and the Dashboard when in classic mode, and in the Navigation block when in FSE mode.</p>



<p class="has-light-gray-background-color has-background has-small-font-size">Sidenote: A short-coming of this approach is that once the navigation has been edited in FSE mode, it will not be possible to edit it in classic mode.</p>



<h3 class="wp-block-heading" id="customization">Customization</h3>



<p>In classic mode, the Customizer is the main tool for editing theme settings. Aside from Menus (see above), by default the Customizer allows users to edit Site Identity and Homepage Settings. These are WordPress settings that are editable elsewhere in the Dashboard, and are also available to block themes. The exception to this is &#8220;Additional CSS&#8221; which is not editable when the Site Editor is enabled. The hope is that the Site Editor will allow users to edit their site directly so that they won&#8217;t need to use additional CSS.</p>



<p>Often themes add more customisation options &#8211; for example colors and fonts. Global Styles offers some of the same customisations. Using the Global Styles API it is possible to make changes to Global Styles in the Customizer. This would allow users to customise their site using both the Customizer and Global Styles. We&#8217;ve been playing with this idea in this PR: <a href="https://github.com/Automattic/themes/pull/3856">Quadrat: Add color customization</a>.</p>



<h2 class="wp-block-heading">Opting in and out of the Site Editor</h2>



<p>One unresolved challenge for universal themes is how to opt-in users to the Site Editor. At present the Site Editor is enabled for all block themes, which includes universal themes (if your theme has a file in the location `block-templates/index.html` it will be treated as block theme).</p>



<p>To be able to launch universal themes before the Site Editor is ready, we will need a mechanism to temporarily disable it. There is more discussion on <a href="https://github.com/WordPress/gutenberg/pull/31235">this issue</a>.</p>



<h1 class="wp-block-heading">What’s next?</h1>



<p>At the moment universal themes are just an idea; there are still many unresolved questions about how we could achieve this vision. For an example of a theme that tries to take a universal approach see <a href="https://github.com/Automattic/themes/tree/trunk/quadrat">Quadrat</a>.</p>



<p>Look out for more posts about this idea as we keep experimenting with it.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themeshaper.com/2021/06/23/universal-themes-some-ideas/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7783</post-id>
		<media:content url="https://0.gravatar.com/avatar/971b36b1bfbac08fbf93afce6f43fa4496d4f0a706bf55b3e1bd7741dccd1e07?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ben</media:title>
		</media:content>
	</item>
		<item>
		<title>Using Blockbase for a theme experiment</title>
		<link>https://themeshaper.com/2021/06/07/using-blockbase-for-a-theme-experiment/</link>
		
		<dc:creator><![CDATA[Kjell Reigstad]]></dc:creator>
		<pubDate>Mon, 07 Jun 2021 16:12:41 +0000</pubDate>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Theme Development]]></category>
		<category><![CDATA[Block-based Themes]]></category>
		<category><![CDATA[Gutenberg]]></category>
		<guid isPermaLink="false">http://themeshaper.com/?p=7760</guid>

					<description><![CDATA[A glitchy theme, built with Blockbase.]]></description>
										<content:encoded><![CDATA[
<p>Last week I spent a little time putting <a href="https://themeshaper.com/2021/05/27/blockbase-a-parent-theme-for-block-themes/">Blockbase</a> to the test. I had some explorations into <a href="https://wordpress.org/plugins/photocopier/">warping text and images using CSS and SVG filters</a> gathering dust, and I thought it would be fun to explore pulling those into a highly-opinionated block theme.</p>



<p>In the past when I’ve done a theme experiment like this, I’ve generally started with something like <a href="https://github.com/WordPress/theme-experiments/tree/master/emptytheme">the <code>emptytheme</code> generator</a> in the <a href="https://github.com/WordPress/theme-experiments">WordPress theme-experiments</a> repository. This provides you with just the required files for building a block theme, so it&#8217;s a good minimal way to get started. </p>



<p>This time around, I used <a href="https://github.com/Automattic/themes/tree/trunk/blockbase">Blockbase</a>. While it doesn’t yet include a quick generator script like <code>emptytheme</code> does, <a href="https://github.com/Automattic/themes/pull/4001">there is one in the works</a>. In lieu of that, I just created a child theme like I normally would: by adding <code>style.css</code>, <code>functions.php</code>, and <code>index.php</code> files. I also copied over the <code>child-theme.json</code> file from the in-progress <a href="https://github.com/Automattic/themes/tree/trunk/quadrat">Quadrat theme</a>, since I knew that would get me started.</p>



<p>My work in <code>child-theme.json</code> was very brief — I just changed a few variables and used Blockbase’s compiler script once. Then I copied and pasted over the block style effects from the plugin mentioned above.</p>



<p>Once that was all in place, I jumped into custom templating. I created just two templates, plus a custom header that featured a video loop of me waving at the camera (but filtered into oblivion using the tools at <a href="https://photomosh.com">photomosh.com</a>). I used a “Warped and Stretched Photocopy” block style on the header’s text, and “Photocopy” style on the featured images. Combined together, this created a highly stylized look and feel, reminiscent of (for better or for worse) the old days of Flash animations:</p>



<figure class="wp-block-video wp-block-embed is-type-video is-provider-videopress wp-embed-aspect-4-3 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe title='VideoPress Video Player' aria-label='VideoPress Video Player' width='500' height='325' src='https://video.wordpress.com/embed/4fIiDvG8?preloadContent=metadata&amp;hd=0&amp;cover=1' frameborder='0' allowfullscreen  allow='clipboard-write' ></iframe><script src='https://v0.wordpress.com/js/next/videopress-iframe.js?m=1739540970'></script>
</div></figure>



<p>This all worked pretty well in the editor too! Due to a combination of Gutenberg limitations and browser bugs, I ran into an issue getting my SVG filters loaded into the Site Editor&#8217;s iFrame, but aside from that, things looked just like the frontend: </p>



<figure class="wp-block-video wp-block-embed is-type-video is-provider-videopress wp-embed-aspect-4-3 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe title='VideoPress Video Player' aria-label='VideoPress Video Player' width='500' height='340' src='https://video.wordpress.com/embed/giykvczJ?preloadContent=metadata&amp;hd=0&amp;cover=1' frameborder='0' allowfullscreen  allow='clipboard-write' ></iframe><script src='https://v0.wordpress.com/js/next/videopress-iframe.js?m=1739540970'></script>
</div></figure>



<p>The filters <em>did</em> work great in the post editor though, so I can show you how that&#8217;s supposed to work by loading the header there: </p>



<figure class="wp-block-video wp-block-embed is-type-video is-provider-videopress wp-embed-aspect-4-3 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe title='VideoPress Video Player' aria-label='VideoPress Video Player' width='500' height='340' src='https://video.wordpress.com/embed/tB0kLFTH?preloadContent=metadata&amp;hd=0&amp;cover=1' frameborder='0' allowfullscreen  allow='clipboard-write' ></iframe><script src='https://v0.wordpress.com/js/next/videopress-iframe.js?m=1739540970'></script>
</div></figure>



<p>In the end, the filters bug is not really a fault of the theme, and something I&#8217;m sure I could resolve if I choose to devote some more time to this exploration. </p>



<p>The theme is obviously a little over-the-top, but that was really the point of the experiment! I&#8217;m amazed I was able to fold my earlier block styles work into such a distinctive, full-featured theme with minimal effort.</p>



<p>Overall, I found that the benefit to using Blockbase was peace of mind. Compared to starting fresh or using <code>emptytheme</code>, Blockbase ensured that I had a fully-functional block theme immediately. It already contained extra templates for pages like 404 and search, and it was full of little CSS fixes for things that full-site editing just doesn’t quite support yet.</p>



<p>This eliminated a lot of extra busywork, and allowed me to dive right in and focus on the theme-building aspect that’s most exciting for me: the theme’s design and creativity.</p>



<p>The code for the theme is over here in case anyone would like to poke around: </p>



<p><a href="https://github.com/Automattic/themes/tree/try/glitchy-theme-experiment/glitchy" rel="nofollow">https://github.com/Automattic/themes/tree/try/glitchy-theme-experiment/glitchy</a></p>



<p>I look forward to seeing Blockbase spark the creation of many more themes!</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7760</post-id>
		<media:thumbnail url="https://themeshaper.com/wp-content/uploads/2021/06/featured-image.png" />
		<media:content url="https://themeshaper.com/wp-content/uploads/2021/06/featured-image.png" medium="image">
			<media:title type="html">featured-image</media:title>
		</media:content>

		<media:content url="https://2.gravatar.com/avatar/ee57ce5b9145a3c9921a755fbd2cf54c5dba759210d9b2d8b1310edf1bb87111?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kjellreigstad</media:title>
		</media:content>
	</item>
		<item>
		<title>Blockbase: A parent theme for block themes</title>
		<link>https://themeshaper.com/2021/05/27/blockbase-a-parent-theme-for-block-themes/</link>
					<comments>https://themeshaper.com/2021/05/27/blockbase-a-parent-theme-for-block-themes/#comments</comments>
		
		<dc:creator><![CDATA[Ben Dwyer]]></dc:creator>
		<pubDate>Thu, 27 May 2021 16:08:04 +0000</pubDate>
				<category><![CDATA[Theme Development]]></category>
		<category><![CDATA[Block-based Themes]]></category>
		<category><![CDATA[Full-site Editing]]></category>
		<guid isPermaLink="false">http://themeshaper.com/?p=7742</guid>

					<description><![CDATA[Phase 2 of Gutenberg introduces Full Site Editing to WordPress; to make this possible, we need a new way of building themes &#8211; using blocks. How do block themes work? Block themes use templates made entirely of blocks. The layout is configured using a combination of theme.json and CSS. The settings in theme.json are used [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p><a href="https://make.wordpress.org/core/2018/12/08/gutenberg-phase-2/">Phase 2 of Gutenberg</a> introduces Full Site Editing to WordPress; to make this possible, we need <a href="https://developer.wordpress.org/block-editor/how-to-guides/themes/block-theme-overview/">a new way of building themes</a> &#8211; using blocks.</p>



<h3 class="wp-block-heading">How do block themes work?</h3>



<p>Block themes use templates made entirely of blocks. The layout is configured using a combination of theme.json and CSS. The settings in theme.json are used to generate CSS &#8211; this is part of the Global Styles feature. The theme CSS is added after the theme.json CSS and together these rules define the layout for a theme. If you&#8217;re just getting started with block themes, <a href="https://themeshaper.com/2020/12/09/getting-started-with-block-themes/">this guide should help</a>.</p>



<h3 class="wp-block-heading">Can I style my whole theme with Global Styles?</h3>



<p>Global Style allows us to set styles for some aspects of the theme, but many common customisations are not yet available. We are actively helping to add more customisations to Global Styles, but in the meantime we have been working on a mechanism to define a lot more theme styles in a custom section of theme.json, until they are available in Global Styles.</p>



<p>The result of this work is a new theme called <a href="https://github.com/Automattic/themes/tree/trunk/blockbase">Blockbase</a>, loosely based on the classic theme <a href="https://wordpress.org/themes/blank-canvas/">Blank Canvas</a>. This block theme attempts to make all the common theme styles configurable in theme.json, and provides the CSS needed to make them work until the blocks themselves support these settings. As more of these configurations are added to Global Styles, we will remove the corresponding CSS from Blockbase.</p>



<h3 class="wp-block-heading">Can Blockbase be used to build more block themes?</h3>



<p>We are currently using Blockbase as a parent theme for all of our block themes; in time we hope that it won&#8217;t be needed. This means that child themes only need to define their settings in a theme.json file, and the parent theme CSS will adjust to these settings. This approach gives us an agreed standard when configuring block styles. It also will make it trivial to move to the Global Styles implementation when that becomes available in core.</p>



<p>Blockbase is intended to be a representation of all the theme style settings that we believe should eventually live in Global Styles and be configurable by users. Some themes need customizations beyond what would be possible with Global Styles. These more unique styles continue to be defined in the theme CSS file.</p>



<h3 class="wp-block-heading">How it works</h3>



<p>Style configurations live in the “styles” section of theme.json. Rules can be defined for both “blocks” and “elements”, and these will be interpreted by Global Styles and generate the appropriate CSS.</p>



<p>The theme.json file also contains a section for “custom” configurations, inside the “settings” property. Settings defined in “custom” are output by Global Styles as CSS variables. These variables are used by the theme CSS files to style blocks and other elements.</p>



<p>Child themes of Blockbase are able to redefine these CSS variables by setting different values in its theme.json. The child theme inherits the Blockbase CSS, but with the new CSS variables defined in theme.json.</p>



<p>To avoid a child theme needing to redefine every value in the theme.json file, child themes can create a child-theme.json file and a script will generate a theme.json file, taking the defaults from Blockbase and updating it with the new values from the child theme.</p>



<p>This mechanism will be particularly useful as more customizations are added to Global Styles; in many cases it will only be necessary to update Blockbase itself and rebuild each child theme, to update the theme.json files. You can find out more about this in the theme&#8217;s readme file.</p>



<h3 class="wp-block-heading">Code size</h3>



<p>Aside from the benefits outlined above, we have also found that this approach to building themes has resulted in a drastic reduction in the amount of code we need to write for both the parent theme and any child themes. As much as possible we rely on the styles that come with Gutenberg, and only add extra rules where necessary. Blockbase CSS is, at the time of writing about 1000 lines of code, whereas Seedlet CSS is over 4000. </p>



<p>As more of these customizations are added to Global Styles, we will be able to remove the corresponding CSS from Blockbase, so we anticipate the size of the theme CSS to reduce over time.</p>



<h3 class="wp-block-heading">How Can I Use This?</h3>



<p>Blockbase is available on <a href="https://github.com/Automattic/themes/">the Automattic themes repo</a>. If there is interest from others in using this approach to build themes we can investigate making it available as an npm package for others to use.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://themeshaper.com/2021/05/27/blockbase-a-parent-theme-for-block-themes/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7742</post-id>
		<media:thumbnail url="https://themeshaper.com/wp-content/uploads/2021/05/screenshot-filled.jpg" />
		<media:content url="https://themeshaper.com/wp-content/uploads/2021/05/screenshot-filled.jpg" medium="image">
			<media:title type="html">screenshot-filled</media:title>
		</media:content>

		<media:content url="https://0.gravatar.com/avatar/971b36b1bfbac08fbf93afce6f43fa4496d4f0a706bf55b3e1bd7741dccd1e07?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ben</media:title>
		</media:content>
	</item>
	</channel>
</rss>
