WordPress Block Themes Explained in 250 Seconds

WordPress block-based themes allow you to build and customize your website visually, removing the need for code-based tailoring. Fully integrated with the Site Editor, block themes give an unprecedented level of visual control over the layout and style of your site.  

In this “Build and Beyond” video, Jamie Marsland walks you through everything you need to know about editing, customizing, and designing every element of your WordPress site using blocks in just 250 seconds. You’ll also get a few sneak peeks of some theme-related features coming in WordPress 6.5 (which will be released March 26, 2024!).

Ready to build on WordPress.com? Start a free trial today:

Start free trial

Quelle: RedHat Stack

“Do the Woo” Finds Its Home at WordPress.com

Bob Dunn loved designing, but didn’t fancy himself a coder. In the early 2000s, while struggling to create a website for his business, he thought to himself, “There’s got to be something better.” When Bob discovered WordPress in 2006, he realized he had discovered that better solution. With WordPress, he could build great-looking sites from scratch without needing to hand-code the entire thing.

In 2010, Bob dove headfirst into the world of WordPress, officially putting his print design business on the backburner and branding himself as “BobWP.” What started as site designing, consulting, and community building would eventually turn into podcasting. But it wasn’t until he discovered WooCommerce that he felt he’d really found his niche. 

Bob had used WooCommerce as a product since its launch and saw a need within the larger WordPress community for a Woo-dedicated space to bring developers, builders, and agencies together. Do the Woo was born, and Bob began his journey to create a podcast voiced by and for the vibrant WooCommerce and WordPress communities. 

As Do the Woo has grown to fourteen unique shows with dozens of co-hosts and countless guests over the years, Bob has been looking for the right online space to call home. He needed a website host that would allow him to easily maintain and market his podcast, allowing him to focus on the community-centered content that makes his podcast so valuable. He found that home at WordPress.com, where he’s been able to utilize a variety of back-end tools to help create a simple and welcoming front-end user experience. 

The teams here at WordPress.com, Woo, and Jetpack are proud to partner with Bob. Do the Woo is providing an essential resource to the Woo and WordPress communities. Not only is he creating a unique space for these conversations to happen, but he’s amplifying the voices of those who want to give podcasting a shot. And take heed, velvet-voiced folks out there: he’s always looking for co-hosts!

Are you ready for your own entrepreneurial journey to begin? Use coupon code dothewoo15 at checkout for 15% off any WordPress.com plan. Click below to take advantage of this special offer:

Get 15% off

Quelle: RedHat Stack

Just Launched: GitHub Deployments

Say goodbye to the hassle of manual file uploads and tedious deployments, and say hello to WordPress.com’s new GitHub Deployments.

With GitHub Deployments, you can seamlessly connect your repository to your WordPress.com site in just a few clicks. Now you can focus on what you do best: writing outstanding code. Each time you push a change to your GitHub repository, it will be deployed to your WordPress.com site automatically or upon request. 

Check out this video overview from Paulo Trentin, one of the developers who worked on this feature:

Here are three reasons why we know you’re going to love GitHub Deployments on WordPress.com:

1. A streamlined workflow

GitHub Deployments help you manage your site’s code in a reliable, predictable, and automated way using version control instead of older or manual mechanisms, such as FTP or SSH tools. In its simplest form, it doesn’t require a workflow file like our previous GitHub integration, which relied on a GitHub action; instead, you can connect and deploy in just a few clicks, all within your WordPress.com dashboard.

This is a welcome change for developers who want to simplify their code deployment process and migrate away from the manual operations and error-prone nature of SFTP and SSH transfers. 

GitHub Deployments also allows you to connect multiple repositories to a single site, encouraging code reusability between the sites you manage. Want to deploy a plugin or theme to multiple sites with a single branch push? Have at it! Want to manage your entire site’s code from a GitHub repository? We’ve got you covered!

2. Run checks and tasks

GitHub Deployments also gives you the power to process files and run tasks before transferring the files to your WordPress.com site through GitHub workflows. This helps ensure that all team members publish code following your chosen patterns and expectations, for example. 

If that’s your thing, you can install Composer dependencies and run any command supported by GitHub actions prior to sending any code updates to your site. Find a few of our favorite workflow recipes here.

Three cheers for unified, well-written code!

3. Deploy the way you want

You can adjust the deployment settings for each repository, giving you complete control over how your code is shipped.

You can choose to automatically deploy changes to your WordPress.com site as soon as code is committed to your repository, or you can request deployments manually. Manual deployments give you the most control over when your code changes are pushed live, as you’ll use the GitHub Deployments interface to trigger a deployment. We recommend manual deployments if you don’t want to use a staging site.

In general, automatic deployments are not recommended for live production sites, as any changes to the code in the repository are automatically deployed from GitHub to the live site. Instead, you may decide to automatically deploy first to a staging site and then sync the staging site to production once you’re ready.

That said, choose your own adventure and deploy on your own terms.

Do your thing, and we’ll handle the rest

Development on WordPress.com has never been easier. Say goodbye to manual deployments and hello to more efficient collaboration, streamlined version control, and the peace of mind that comes with knowing your project data is secure.

Get instant access to our new GitHub Deployments with a Creator or Entrepreneur plan (did you know we have a 14-day refund policy?).

Ready to try GitHub Deployments out for yourself? Click here to start deploying, and learn more by reading our developer documentation.

Major kudos to the GitHub Deployments team on this launch! Paulo Trentin, Jeroen Pfeil, Kenroy Mcleish, Mike Kelly, Javier Arce, Jeff Sanquist, Alexa Peduzzi, Jeremy Anderberg, and our beta testers.
Quelle: RedHat Stack

Re-Creating The New York Times’ Website in Under 30 Minutes Using WordPress.com

In this “Build and Beyond” video, Jamie Marsland re-creates The New York Times’ website in less than 30 minutes using WordPress.com. By utilizing mega menus, master layouts, typography controls, and post grids, Jamie shows us what’s possible with the limitless customizations available with WordPress.

When it comes to mega menus, specifically, it’s worth noting that this is a highly complex customization that should only be attempted by WordPress pros and is mainly shown here as a demo of what’s possible. Please read this blog post on the WordPress.org developer blog before embarking on your own mega menu.

To learn more and get started on your own site today, click below:

Start building

Quelle: RedHat Stack

WordCamp Asia 2024: The WordPress Community Comes Together in Taipei

This year’s WordCamp Asia was held in Taipei, the vibrant capital city of Taiwan. Members from WordPress.com joined other Automatticians, as well as around 2,000 other attendees from across 70 countries to connect, learn, build, and give back to the platform that powers millions of top websites across the internet.

The event kicked off with Contributor Day, an opportunity for anyone in the WordPress community, from newcomers to seasoned experts, to get involved and contribute to WordPress. Contributing can mean contributing to code, but it can also mean sharing your expertise in design, offering support in forums, translating content, and much much more. This year’s Contributor Day had a fantastic turnout and it was amazing to see so many folks show up and participate! 

As always, there was a variety of informative and inspiring talks. Some of our favorites included talks about the future of WordPress, the multifaceted nature of design, building and maintaining WordPress sites with AI, achieving efficient workflows with the site editor, and the importance of diversity, equity, inclusion, and belonging in the tech and WordPress communities. If any of these topics pique your interest, you can take a look at the livestream recordings for these and all other WordCamp Asia 2024 talks here. 

While our colleagues from the WordPress Project, Woo, and Jetpack participated in the event, folks from WordPress.com were also present, contributing, networking, and engaging with the community.

This year we were particularly interested in connecting with developers so that we could better understand their experiences with WordPress.com. Our hosting infrastructure, powered by WP Cloud, is best-in-class, yet the benefits aren’t as well-known in the developer community. To help get the word out about all of our developer-focused features, we’ve recently relaunched our developer site at developer.wordpress.com. Check it out to learn about staging sites, WP-CLI access, and Studio, our upcoming local development environment. 

During the anticipated closing Q&A session at WordCamp Asia 2024, Matt Mullenweg, co-founder of WordPress and CEO of Automattic, opened up about his dreams for a web that’s both open and accessible to everyone. He shared how the core principles of open source are not just shaping WordPress but also knitting together a worldwide community of contributors.

That sense of community is something you can definitely feel at WordCamps. Thirty-six percent of attendees at this WordCamp were first-time participants—a testament to the event’s growing appeal and the ever-expanding WordPress community.

During the closing remarks, Matt revealed that State of the Word 2024 will be held in Tokyo, Japan. The lead organizers also revealed the next WordCamp Asia location: Manila, Philippines, in February 2025. With Manila’s rich tapestry of Spanish, European, American, and Asian influences, we’re in for a vibrant mix of culture, cuisine, and community!

But you don’t have to wait until 2025 to start getting involved. There’s a huge number of local and regional WordCamps happening year-round. Head over to https://central.wordcamp.org/ to find one near you. Whether you’re looking to develop your skills, learn something new, network with the community, there’s something for everyone. We hope to see you out there! 
Quelle: RedHat Stack

Introducing “Build and Beyond”: A New Video Series From WordPress.com and Jamie Marsland

Jamie Marsland has been preaching the WordPress gospel for over a decade and has trained thousands of people on blocks, plugins, and more. Through his popular YouTube channel and hands-on courses, Jamie provides incredible tutorials and breaks down the most common misconceptions about building with WordPress. 

We’re happy to share that WordPress.com is partnering with Jamie over the next few months to create a series of videos that will show you how to get the most out of your website experience. From exciting new feature announcements to handy tips and tricks to Jamie’s mind-blowing “website re-creations,” we promise you’ll learn something new in every video.  

Starting later this week, you’ll see those videos posted to both our own YouTube channel as well as this blog. Stay tuned!  
Quelle: RedHat Stack

WP Cloud Is Powering the Future of WordPress

The foundational infrastructure for the websites you build and manage is crucial for ensuring a safe, secure, fast, and reliable environment. That’s where WP Cloud comes in. 

Automattic, the parent company of WordPress.com, built WP Cloud because we wanted a cloud platform constructed from the ground up just for WordPress. We’ve hosted millions of websites across the WordPress ecosystem and have become one of the most trusted providers in cloud services. 

At WordPress.com, the WP Cloud infrastructure powers all websites on our Creator and Entrepreneur plans. 

We’re proud of WP Cloud’s 99.999% uptime, automated burst scaling and failure detection, and failover redundancies that allow you to spend time focusing on building your business or serving your clients instead of worrying about whether a traffic spike will crash the site. 

WP Cloud is also incredibly secure. With DDoS protection, malware scanning, anti-spam measures, SSL certificates, TLS traffic encryption, and real-time backups, you’ll have peace of mind from day one. 

We’re confident that there’s no better cloud platform for your WordPress site(s) than WP Cloud. And we’re not the only ones to think so. 

Today, WP Cloud is announcing that Bluehost—one of the largest website hosts in the world—is launching a new product built atop WP Cloud’s best-in-class infrastructure. 

Bluehost Cloud includes all the technical excellence of WP Cloud, with bundled options for hosting multiple websites. Plus, as with all of the sites on WordPress.com, it comes with Jetpack’s highly acclaimed performance and security features built right in. 

To kick off this partnership, we’re showcasing Bluehost Cloud on WordPress.com’s pricing page, so that you can choose the product that best fits your business needs. As fellow supporters of the WordPress ecosystem, we’re glad Bluehost has chosen WP Cloud for this powerful new offering.

Take advantage of these robust WP Cloud solutions with the Creator, Entrepreneur, or Bluehost Cloud plan.
Quelle: RedHat Stack

Case Study: Jelly Pixel Studio’s Journey With WordPress.com

Jelly Pixel Studio, a web development agency based in Indonesia, specializes in crafting unique and illustrative websites for clients worldwide. The company serves a wide variety of clients, from small businesses to larger corporations, utilizing WordPress.com as their primary hosting platform due to its exceptional stability, fast performance, and robust features.

Over the years, the agency has migrated numerous websites to WordPress.com and has seen consistent uptime and improved efficiency, saving both time and money. The agency’s founder, Andika Purnawijaya, better known as Dika Fei, cites WordPress.com as the magic solution that helped solve many hosting challenges for the agency’s clients.

Let’s explore a bit more about Jelly Pixel and how WordPress.com helps keep their clients happy.

Dika’s path to web development

Dika Fei embarked on his web development journey right after university, learning and mastering IBM’s WebSphere. His first interaction with WordPress.com came when he joined Codeable to work with various clients whose sites were hosted on the WordPress.com platform. Dika saw the immense value in WordPress.com and adopted it for the majority of his projects.

Jelly Pixel Studio was born out of a failed startup venture by Dika and three of his friends from college. After their initial attempt at creating something similar to Shopify for the Indonesian market didn’t work out, the team decided to channel their expertise into a highly successful web development agency. When choosing a platform, they settled on WordPress due to its simplicity and intuitiveness.

The team later branched out to form a second agency, WP Stronk, which handles subscription-based web maintenance and content entry.

When asked if the agencies focused on any specific niche, Dika said, “YES! Jelly Pixel is exceptionally skilled at creating illustrative websites with subtle scrolling animations. Our websites leave a lasting impression even after you close the tab.”

The impact of WordPress.com

WordPress.com has been instrumental in helping Jelly Pixel Studio streamline its operations and deliver outstanding services to clients. With a mix of projects in maintenance and those being actively developed, Dika and his team of seven, or “the magnificent seven” as they like to call themselves, have benefited greatly from the platform’s robust features and top-notch performance.

WordPress developers and agencies are no strangers to the perils and pitfalls of hosting. But WordPress.com solves those problems for Jelly Pixel Studio clients:

What I love about WordPress.com is its exceptional stability and blazing-fast performance, regardless of your setup. Even with other managed hosting providers, you often need to be mindful of  various settings such as: cache parameters and PHP workers. However, with WordPress.com, everything just works seamlessly. It’s a true “set it and forget it” experience. 

As long as your site is hosted on WordPress.com, you can rest assured that it won’t go down and it won’t slow down, no matter the traffic. I have no idea how you accomplished it, but it’s absolutely AMAZING! 

Literally magic

The team considers WordPress.com to be a good fit for their clients. Why?

You have amazing support, and your infrastructure is LITERALLY MAGIC. We have monitored our clients’ uptime, and 100% is a number we often see. How is this even possible? “Amazing” would be an understatement. You have saved me from a ton of urgent calls at night.

Jelly Pixel Studio believes WordPress.com has one well-kept secret:

I firmly believe that WordPress.com is the best hosting option for WooCommerce, particularly those with high traffic. 

He thinks this is a missed opportunity for many freelancers and agencies who may not have considered using WordPress.com for their hosting clients. He shares this example:

I have a client on a different host. They get HUGE traffic. Every time they have a sale, they need to purchase a package upgrade and I have to constantly monitor their ad parameters to ensure proper caching. With the way WordPress.com works, all of this would be seamlessly handled out of the box.

He adds:

Unfortunately, the knowledge of WordPress.com as a highly stable WooCommerce hosting solution seems to have been lost over time. It almost feels like a well-kept secret! 

The verdict

Dika and his team at Jelly Pixel Studio view WordPress.com as a valuable partner in their web development journey. Dika credits the platform for providing peace of mind, leading to a happier and more productive work environment for his team, as well as clients who no longer complain about their site’s performance. He looks forward to further cooperation with WordPress.com and hopes for the continued evolution of the platform’s capabilities.

At the heart of his work, Dika stands by this quote from Victor Frankl:

“For success, like happiness, cannot be pursued; it must ensue, and it only does so as the unintended side-effect of one’s personal dedication to a cause greater than oneself.”

This approach is echoed in the success story of Jelly Pixel Studio and WP Stronk, marking the agencies as businesses of kindness, dedication, and commitment to problem-solving.

The power of hosting with WordPress.com

WordPress web design and development agencies are discovering the power of WordPress.com hosting and the benefits it offers their clients. With full-stack performance, robust security, and developer-friendly features, WordPress.com provides agencies with a platform they can confidently recommend to their clients.

If you’re interested in getting access to the tools and features on WordPress.com that can support your development process, click here to enable our “I am a developer” setting on your WordPress.com account.

Finally, if you’re in search of an agency specializing in illustrative websites and CRO (Conversion Rate Optimization), Jelly Pixel Studio can help you. For web and content maintenance, check out WP Stronk for their comprehensive services.
Quelle: RedHat Stack

Welcome to a More Powerful WP-Admin Experience

As Automattic CEO Matt Mullenweg teased in a January blog post, our team at WordPress.com is working hard to enhance our developer experience. Improving what you see in your dashboard when you log into WordPress.com is one of our biggest goals.

Today, we’re excited to unveil a more powerful wp-admin experience (if you know, you know), which will soon be available to all sites on Creator and Entrepreneur plans. Read on to find out how to get early access.

Don’t call it a comeback

For many years, the default view for WordPress.com users has been a modernized, more friendly version of the classic WordPress experience. Around the office, we call this interface “Calypso.” It offers sleek post/page management, easy profile edits, built-in tips and resources for starting or growing your site, and more.

While the Calypso interface is ideal for some folks, we’ve heard from a lot of developers that you’d prefer easy access to the classic WordPress dashboard experience. So, we’re doing just that by making it possible for wp-admin to be the default view when you log in. 

Our mission here is to empower our power users—those on Creator and Entrepreneur plans—to leverage WordPress to its fullest. This update promises:

Enhanced flexibility: Tailor your interface to seamlessly match your workflow.

A familiar, WordPress-centric experience: Enjoy an interface that feels right at home, mirroring the robust capabilities you expect from other WordPress hosts.

Superior management for complex sites: Handle sophisticated sites and client projects with ease.

While this initial launch is for Creator and Entrepreneur subscribers, our commitment extends to all WordPress.com users. We’re excited about the possibility of expanding these features to everyone in the future. 

Join the early access list

To access the wp-admin interface you know and love, please join our email list below to be considered for early access.

Submit a form.

And stay tuned for even more updates coming your way, including a few menu and navigation changes that you won’t want to miss.
Quelle: RedHat Stack

How We Built a New Home for WordPress.com Developers Using the Twenty Twenty-Four Theme

In the last few weeks, our team here at WordPress.com has rebuilt developer.wordpress.com from the ground up. If you build or design websites for other people, in any capacity, bookmark this site. It’s your new home for docs, resources, the latest news about developer features, and more. 

Rather than creating a unique, custom theme, we went all-in on using Twenty Twenty-Four, which is the default theme for all WordPress sites. 

That’s right, with a combination of built-in Site Editor functionalities and traditional PHP templates, we were able to create a site from scratch to house all of our developer resources. 

Below, I outline exactly how our team did it.

A Twenty Twenty-Four Child Theme

The developer.wordpress.com site has existed for years, but we realized that it needed an overhaul in order to modernize the look and feel of the site with our current branding, as well as accommodate our new developer documentation. 

You’ll probably agree that the site needed a refresh; here’s what developer.wordpress.com looked like two weeks ago:

Once we decided to redesign and rebuild the site, we had two options: 1) build it entirely from scratch or 2) use an existing theme. 

We knew we wanted to use Full Site Editing (FSE) because it would allow us to easily use existing patterns and give our content team the best writing and editing experience without them having to commit code.

We considered starting from scratch and using the official “Create Block Theme” plugin. Building a new theme from scratch is a great option if you need something tailored to your specific needs, but Twenty Twenty-Four was already close to what we wanted, and it would give us a headstart because we can inherit most styles, templates, and code from the parent theme.

We quickly decided on a hybrid theme approach: we would use FSE as much as possible but still fall back to CSS and classic PHP templates where needed (like for our Docs custom post type).

With this in mind, we created a minimal child theme based on Twenty Twenty-Four.

Spin up a scaffold with @wordpress/create-block

We initialized our new theme by running npx @wordpress/create-block@latest wpcom-developer. 

This gave us a folder with example code, build scripts, and a plugin that would load a custom block.

If you only need a custom block (not a theme), you’re all set.

But we’re building a theme here! Let’s work on that next.

Modify the setup into a child theme

First, we deleted wpcom-developer.php, the file responsible for loading our block via a plugin. We also added a functions.php file and a style.css file with the expected syntax required to identify this as a child theme. 

Despite being a CSS file, we’re not adding any styles to the style.css file. Instead, you can think of it like a documentation file where Template: twentytwentyfour specifies that the new theme we’re creating is a child theme of Twenty Twenty-Four.

/*
Theme Name: wpcom-developer
Theme URI: https://developer.wordpress.com
Description: Twenty Twenty-Four Child theme for Developer.WordPress.com
Author: Automattic
Author URI: https://automattic.com
Template: twentytwentyfour
Version: 1.0.0
*/

We removed all of the demo files in the “src” folder and added two folders inside: one for CSS and one for JS, each containing an empty file that will be the entry point for building our code.

The theme folder structure now looked like this:

The build scripts in @wordpress/create-block can build SCSS/CSS and TS/JS out of the box. It uses Webpack behind the scenes and provides a standard configuration. We can extend the default configuration further with custom entry points and plugins by adding our own webpack.config.js file. 

By doing this, we can:

Build specific output files for certain sections of the site. In our case, we have both PHP templates and FSE templates from both custom code and our parent Twenty Twenty-Four theme. The FSE templates need minimal (if any) custom styling (thanks to theme.json), but our developer documentation area of the site uses a custom post type and page templates that require CSS.

Remove empty JS files after building the *.asset.php files. Without this, an empty JS file will be generated for each CSS file.

Since the build process in WordPress Scripts relies on Webpack, we have complete control over how we want to modify or extend the build process. 

Next, we installed the required packages:

​​npm install path webpack-remove-empty-scripts –save-dev

Our webpack.config.js ended up looking similar to the code below. Notice that we’re simply extending the defaultConfig with a few extra properties.

Any additional entry points, in our case src/docs, can be added as a separate entry in the entry object.

// WordPress webpack config.
const defaultConfig = require( ‘@wordpress/scripts/config/webpack.config’ );

// Plugins.
const RemoveEmptyScriptsPlugin = require( ‘webpack-remove-empty-scripts’ );

// Utilities.
const path = require( ‘path’ );

// Add any new entry points by extending the webpack config.
module.exports = {
…defaultConfig,
…{
entry: {
‘css/global': path.resolve( process.cwd(), ‘src/css’, ‘global.scss’ ),
‘js/index': path.resolve( process.cwd(), ‘src/js’, ‘index.js’ ),
},
plugins: [
// Include WP’s plugin config.
…defaultConfig.plugins,
// Removes the empty `.js` files generated by webpack but
// sets it after WP has generated its `*.asset.php` file.
new RemoveEmptyScriptsPlugin( {
stage: RemoveEmptyScriptsPlugin.STAGE_AFTER_PROCESS_PLUGINS
} )
]
}
};

In functions.php, we enqueue our built assets and files depending on specific conditions. For example, we built separate CSS files for the docs area of the site, and we only enqueued those CSS files for our docs. 

<?php

function wpcom_developer_enqueue_styles() : void {
wp_enqueue_style( ‘wpcom-developer-style’,
get_stylesheet_directory_uri() . ‘/build/css/global.css’
);
}

add_action( ‘wp_enqueue_scripts’, ‘wpcom_developer_enqueue_styles’ );

We didn’t need to register the style files from Twenty Twenty-Four, as WordPress handles these inline.

We did need to enqueue the styles for our classic, non-FSE templates (in the case of our developer docs) or any additional styles we wanted to add on top of the FSE styles.

To build the production JS and CSS locally, we run npm run build. 

For local development, you can run npm run start in one terminal window and npx wp-env start (using the wp-env package) in another to start a local WordPress development server running your theme.

While building this site, our team of designers, developers, and content writers used a WordPress.com staging site so that changes did not affect the existing developer.wordpress.com site until we were ready to launch this new theme.

theme.json

Twenty Twenty-Four has a comprehensive theme.json file that defines its styles. By default, our hybrid theme inherits all of the style definitions from the parent (Twenty Twenty-Four) theme.json file. 

We selectively overwrote the parts we wanted to change (the color palette, fonts, and other brand elements), leaving the rest to be loaded from the parent theme. 

WordPress handles this merging, as well as any changes you make in the editor. 

Many of the default styles worked well for us, and we ended up with a compact theme.json file that defines colors, fonts, and gradients. Having a copy of the parent theme’s theme.json file makes it easier to see how colors are referenced.

You can change theme.json in your favorite code editor, or you can change it directly in the WordPress editor and then download the theme files from Gutenberg.

Why might you want to export your editor changes? Styles can then be transferred back to code to ensure they match and make it easier to distribute your theme or move it from a local development site to a live site. This ensures the FSE page templates are kept in code with version control. 

When we launched this new theme on production, the template files loaded from our theme directory; we didn’t need to import database records containing the template syntax or global styles.

Global styles in SCSS/CSS

Global styles are added as CSS variables, and they can be referenced in CSS. Changing the value in theme.json will also ensure that the other colors are updated.

For example, here’s how we reference our “contrast” color as a border color:

border-color: var(–wp–preset–color–contrast);

What about header.php and footer.php?

Some plugins require these files in a theme, e.g. by calling get_header(), which does not automatically load the FSE header template. 

We did not want to recreate our header and footer to cover those cases; having just one source of truth is a lot better.

By using do_blocks(), we were able to render our needed header block. Here’s an example from a header template file:

<head>
<?php
wp_head();
$fse_header_block = do_blocks( ‘<!– wp:template-part {"slug":"header","theme":"a8c/wpcom-developer","tagName":"header","area":"header", "className":"header-legacy"} /–>’ );
?>
</head>
<body <?php body_class(); ?>>
<?php
echo $fse_header_block;

The new developer.wordpress.com site is now live!

Check out our new-and-improved developer.wordpress.com site today, and leave a comment below telling us what you think. We’d love your feedback. 

Using custom code and staging sites are just two of the many developer features available to WordPress.com sites that we used to build our new and improved developer.wordpress.com.

If you’re a developer and interested in getting early access to other development-related features, click here to enable our “I am a developer” setting on your WordPress.com account.

Quelle: RedHat Stack