[ad_1] WordCamp US 2024 is in full swing, and Matt Mullenweg, co-founder of WordPress, shared his thoughts on a powerful philosophy driving Open Source. Ecosystem Thinking Mullenweg introduced the concept of “Ecosystem Thinking,” a philosophy that drives successful collaborative projects. “Actual Open Source licenses are the law that guarantees freedom, the bulwark against authoritarianism. But what makes Open Source work isn’t the law, it’s the ethos. It’s the social mores. It’s what I’m now calling Ecosystem Thinking: the mindset that separates any old software with an open source license from the software that’s alive, that’s humming with activity and contributions from a thousand places.” he noted. This philosophy comprises four essential elements: Learn: Embrace the beginner’s mindset and constantly engage with new ideas. Evolve: Apply what you learn to the next iteration, allowing real-world feedback to guide you. Teach: Teaching others reinforces your own understanding, spreading knowledge throughout the ecosystem. Nourish: Share the fruits of your success with the broader community to help everyone thrive. ‘Nourish’ is the philosophy behind WordPress’s Five For the Future initiative, where companies and individuals commit a portion of their resources to supporting the WordPress project and ecosystem. This ethos is what keeps Open Source alive and vibrant. Mislabeling Open Source He also shared the challenges Open source is facing. Even though Open Source has taken over as an “intellectual and moral movement,… false prophets like Meta are trying to co-opt it.” He referenced Meta’s “open-source” AI model, Llama, as a prime example of this trend. While LLaMA is free, its license restricts use for companies with over 700 million active users. Mullenweg argued that although Meta has the right to impose such terms, labeling it as “Open Source” misleads the public. Vote with your Wallet Mullenweg encouraged the community to “vote with your wallet” by supporting companies that actively contribute to the Open Source ecosystem. He praised organizations like Newfold, Awesome Motive, 10up, Godaddy, Hostinger, and Google but warned of “parasitic entities that just want to feed off the host without giving anything back.” To make his point, Mullenweg compared the Five For the Future contributions from Automattic and WP Engine, a competitor of similar size. Automattic contributes 3,786 hours per week, while WP Engine contributes just 47. “Those of us who are makers, who create the source, need to be wary of those who would take our creations and squeeze out the juice. They’re grifters who will hop onto the next fad, but we’re trying to build something big here, something long term—something that lasts for generations,” he said. Mullenweg urged the community to be mindful of their choices: “Think about that next time it comes up to renew your hosting or domain, weigh your dollars towards companies that give back more, because you’ll get back more, too. Freedom isn’t free.” This is not the first time Mullenweg has discussed this point. “Those who care about the future of WordPress should spend their dollars with less parasitic companies,” he said in 2022. [ad_2] Source link
Continue readingTag Archives: Open
WordPress XML Files: What They Are and How to Open Them
[ad_1] WordPress XML files see a lot of use for me as a content creator, and site owner. They let me perform many different tasks when running a site, developing layouts and designs, and much more. For you, WordPress XML files can help you to run an online store, or even set up crucial Search Engine Optimization (SEO). In this comprehensive guide, I’ll walk you through what WordPress XML files are, the importance of them for the platform, and much more. First, let’s look at what these types of files are. What a WordPress XML File Is In my years of working with WordPress, I’ve come to appreciate the versatility of eXtensible Markup Language (XML) files. As the name implies, it’s a markup language that lets you store and transport data in a format that’s both human-readable and machine-readable. My opinion is that XML is similar to HTML. However, while you use HTML to display data, XML describes and organizes it. This makes XML valuable for tasks in WordPress such as content migration, plugin configuration, and theme customization. Using XML files is a lot like using JSON in its application. For WordPress it plays a crucial role in various aspects of managing a site and shuttling data around. The Advantages of Using XML in WordPress There are a few positives in using XML over other formats relating to WordPress. First of all, XML provides a clear structure for complex data, which is useful for WordPress exports. What’s more, I can create custom XML structures for specific WordPress plugins or themes as I need to. For practical uses, XML is a great fit for WordPress: Compatibility. Various plugins and themes can read XML files, which makes data transfer between different WordPress installations or even different platforms smoother. Readability. Unlike some data formats, I can open an XML file and understand its contents, which is helpful if I need to troubleshoot a problem. Validity. You can validate XML documents against a schema, which ensures data integrity when you migrate WordPress content. These advantages means that WordPress XML files come in handy for a number of different tasks. Common Uses of XML Files in WordPress You’ll likely come across XML a lot when using WordPress. You can find the language in a number of areas, thanks to its readable format and simple customization: Content migration: WordPress uses the WordPress eXtended RSS (WXR) format to import and export content. WXR is a subset of XML, in that all WXR files are XML, but not the other way around. Plugin configuration. Some plugins use XML files to store complex configuration settings. Theme customization. You can sometimes use XML to define custom post types, taxonomies, or widget areas in classic themes. Content feeds. WordPress generates its syndicated content feeds in XML format for blog posts and user comments. Generating sitemaps. XML is the markup language a sitemap will use, and later, I’ll discuss how you can achieve this, and why a plugin could be the best option. API Interactions: Some external services interact with WordPress using XML-based APIs. I’ll look at a few of these aspects later, but before that, I want to show you the structure of an XML file and how to work with them. The Structure of WordPress XML Files I understand XML structure as three aspects. First up are elements. These are the building blocks of XML. In WordPress, you’ll often see elements such as , , or : My First Blog Post Welcome to my WordPress blog! From there, attributes provide additional information about those elements. For example, WordPress export files might use post_type or status: Finally, the date the element contains is its values. In practical terms, this will be whatever is in between elements: At the top of the XML file, there will likely be a declaration: This simply specifies the XML version and encoding the file uses. It’s similar to the declaration for that language. How to Open and Edit a WordPress XML File There are a few ways you can open an XML file within WordPress. Some are better than others, and I tend to opt for the simplest method unless I need to do heavy work on a file. For me, this is a text editor—TextEdit on the Mac: If you work on Windows, Notepad is just as good. Sometimes I will open the XML in a dedicated code editor, such as JetBrains’ PhpStorm: If I just want to quickly view the file structure (or the ‘tree’), I’ll drag-and-drop the file into a web browser window: There are other dedicated XML editors, such as XMLSpy or Oxygen XML Editor. However, I rarely (if ever) turn to these. For WordPress-specific tasks, they don’t hold much value for me. When editing XML files for WordPress, I try to remember and follow a few good practices: Always create a backup of the original XML file. Choose a tool that can read the WXR format, even if you may not work in that particular markup. Once you make your changes, I always validate the XML to catch any errors. I’ll take care with special characters. For instance, I’ll use entity references (such as & for &) when including special characters in content. Make sure to save the file with the correct encoding (usually UTF-8) to avoid issues with non-English content. Unless I work with web development projects that use JavaScript, PHP, CSS, and HTML files, I’ll simply open in a text editor. I may also use a lighter code editor to take a look, such as Sublime Text or my personal favorite, Onivim2. It all depends on the application and my specific need, and the options come in handy when deciding on the task at hand. Working With WordPress XML Files: 3 Use Cases I want to show you some typical ways you’ll use XML in WordPress. These are all tasks I carry out either very often or enough that it’s worth highlighting as part of my job: Let’s
Continue readingState of CSS 2024 Survey Now Open – WP Tavern
[ad_1] The annual State of CSS 2024 Survey is officially open. The survey aims to explore the “world of styles and selectors to try and identify upcoming trends, and figure out what features and tools to learn next.” Organized by Devographics, with support from contributors, translators, and volunteers, the survey is open to everyone. CSS users are encouraged to take the survey by September 7, 2024. This year’s survey introduces several new features and takes around 15-20 minutes to complete, with all questions being optional. The survey covers 11 key topics, including Layout, Shapes and Graphics, Colors, Interactions, Accessibility, and a concluding ‘About You’ section. Since its launch in 2019, the survey has grown in popularity, with 9,190 developers participating last year. Some insights from the previous survey include: Most participants were from the USA, followed by Germany and the UK. 61.3% of respondents identified as male, 7.7% as female, and 1.4% as non-binary or gender non-conforming. Bootstrap and Tailwind CSS topped the list in terms of usage, while Tailwind CSS and PureCSS led in retention. CSS was primarily used for web apps, blogs, and marketing sites. Subgrid was the most commented feature, Open Props the technology with the highest percentage of returning users and Panda the tool most mentioned in freeform questions. The survey data is valuable for browser vendors, influencing their focus areas and roadmaps. Rachel Andrew, content lead for web.dev and developer.chrome.com at Google, shared that the State of CSS survey is one of the methods they use to learn what’s important to the developers. “These surveys let you tell us exactly what you are using, and what you want to use but can’t due to bugs or lack of support. They help us to see the places where more learning materials might be helpful, or which things we should prioritize for implementation in the browser.”, she said. Sacha Greif mentioned that this year, the team aims to release the results within weeks after the survey closes. The next surveys on the schedule are the State of HTML 2024 (September 10), the State of React 2024 (October 10), and the State of JavaScript 2024 (November 10). [ad_2] Source link
Continue readingRegistrations Open for WordPress Accessibility Day 2024 – WP Tavern
[ad_1] Registrations are now open for WordPress Accessibility Day 2024, scheduled for October 9-10, 2024. This nonprofit, free, 24-hour global event is on a mission “to demystify website accessibility for WordPress developers, designers, content creators, and users so that they can build websites that work for everyone.” Initially launched in 2020 by the WordPress Core Accessibility Team, the event is now organized by the Accessibility Team alongside dedicated volunteers from the WordPress community. This year’s event is led by a team of three Board of Directors—Amber Hinds, Bet Hannon, and Joe Dolson—supported by eight Team Leads and 19 Organizers. The conference is pre-approved for continuing education credits for the International Association of Accessibility Professionals Web Accessibility Specialist (WAS) and Certified Professional in Core Competencies (CPACC) certifications. Lainey Feingold, renowned for her role in negotiating the first web accessibility agreement in the U.S., will be the keynote speaker. Her keynote address, “Accessibility is a Civil Right: The Digital Accessibility Legal Landscape for the WordPress Community,” will explore the current legal landscape of digital accessibility from a human rights perspective. The full schedule is out, with over 20 presentations on a single track. The event will be live-streamed with live captioning and American Sign Language (ASL) Interpretation. Those who miss it can watch it later on the WP Accessibility Day YouTube channel and on their website with captions and full transcripts. The event will be hosted virtually on Zoom, where registered participants can enjoy 24 hours of insightful talks on WordPress and accessibility. Attendees will also receive virtual swag and have the opportunity to win prizes. WordPress Accessibility Day is sponsored by Knowbility, and interested community members can donate to the event through the website. [ad_2] Source link
Continue readingLast Call for the 2023 State of Open Source Survey – WP Tavern
[ad_1] OpenLogic, a company that provides technical support for enterprise open source infrastructure, and the Open Source Initiative (OSI), the nonprofit stewards of the Open Source Definition (OSD, have collaborated to put together the 2023 State of Open Source Survey. The annual survey collects data from professionals to identify trends in the adoption and challenges of using open source technologies. It takes less than 10 minutes to answer the 31-question survey. Respondents are asked if their organizations have increased the use of OSS over the last year and in which categories of software they have invested the most in terms of projects, budget, and resources. The 2022 survey had 2,660 respondents. It found the #1 reason respondents are using OSS is access to innovation, followed by cost reduction and security/availability of patches. More than 36% of respondents indicated that they significantly increased their use of OSS over the past year. The 2022 survey found the biggest barrier to adopting open source software was the lack of internal skills to test, use, integrate, and support it. The last call has gone out to contribute to this year’s survey. It would be good to have WordPress software organizations represented in the results as part of the broader OSS community. Respondents who take the time to fill out the survey are entered for a chance to win a $200 Amazon gift card. OpenLogic is also donating $1 for every response to the World Food Program, a humanitarian organization working to end world hunger. [ad_2] Source link
Continue readingThe good and the bad of open source WordPress
[ad_1] Here is Lesley reading her own story aloud. Why I believe open source is the best and worst thing about WordPress. When I first discovered WordPress in 2016, it was merely a tool for me. It was the cheapest and most flexible way to get a website started for my fledgling explainer video business, so I used it. As a long time blogger and website-maker, since the days of GeoCities, I was very confident I would find WordPress a breeze to use. I opened up a fresh new install of WordPress for the very first time in my life and was confronted with an intimidating admin interface. The stuff on the right seemed meaningless and unhelpful, and the stuff on the left was way more complicated than I was used to. What did media library mean and when do I use it? It was lucky that I’d been making websites and blogging since I was a child. It was also a good thing that I knew WordPress was really really popular. Had it not been for those two things, I would likely have given up. Instead, I powered through, confident that, if millions of people could figure it out, I could too. After some tinkering, and reading recommendations, I purchased and installed a page builder, Thrive Themes, and started building my site. I watched many tutorials, made tons of mistakes, and got frustrated countless times. But after a month or two, it finally felt like I’d gone from pushing a boulder uphill, to chasing the boulder downhill. Incidentally, I still use Thrive today! Why Open Source Matters I owe a big part of my journey to the open source nature of WordPress. Being able to play around for almost no money allowed me the freedom to experiment and make mistakes with little penalty. I didn’t have to worry about paying $50 or even $5 per month for each random side project I start, which allowed me to play around and really deepen my knowledge of building websites. I bet lots of other people attribute their web building journey to WordPress and open source too. And that’s likely to be a large reason for WordPress’ popularity. It’s free for anyone to use, so lots of hosts offer it as one of their default options. There are also loads of plugins out there that help you turn your WordPress site into anything you can possibly imagine. It means that a receptionist or a journalist can move from one job to another and easily log into their company’s website, update the opening hours or write a blog post, because everyone is on WordPress. It means a first-time business owner like myself can create their first website and not worry about making newbie mistakes since the cost of wrong decisions is low – it’s really easy to migrate from host to host, change themes, remove plugins and more. Where’s It’s Not Perfect However, open source is not without its drawbacks. Like I mentioned above, the first time I logged into WordPress I found it overwhelming. It’s hard to draw a direct line to the exact reason why, but here are some of the reasons that came to mind: Firstly, there isn’t a dedicated team with KPIs to hit who are focused on making onboarding super easy for complete beginners. In commercial software, this is typically a top priority as customers who can’t get onboarded, will usually churn, which loses money for the company. In contrast, in WordPress, we have contributors who are typically seasoned WordPress pros. They no longer remember what it’s like to use WordPress for the first time. And because of the contributor model, we also don’t have enough teams with dedicated UX researchers, product managers, and more for each aspect of WordPress. In addition, WordPress is largely built by developers with a developer-first mindset. Thus, the teams are conceived from a developer standpoint (performance, multisite, etc) rather than from a user standpoint. For example, it would be wonderful to have teams focused on the experiences around onboarding, dashboard, plugins, themes, which is how the average user mentally structures WordPress. Also, it’s impossible to keep track of usage data, so there’s no way to know where people are struggling across the entire WordPress project. This matters because the best way to justify having teams focused on certain aspects of WordPress is to present numbers. However, since we don’t have numbers, it’s impossible to present a strong case. The final issue is that WordPress is gigantic. It powers everything from The American Whitehouse website, to small businesses in Singapore (like mine). This pins WordPress in a very tricky spot, because the needs of the Whitehouse are very different to the needs of a small business on the equator. And any updates that are made to WordPress have to take the breadth of use cases into consideration. Ultimately, I’m glad that WordPress is open source, even despite the drawbacks. It helps so many people grow their businesses, communicate, and simply share their thoughts with everyone on the internet. There is no such thing as only good without the bad. And I’m glad WordPress exists. Related [ad_2] Source link
Continue readingOpen Collective Launches New Way to Support Open Source through Public Stock Shares – WP Tavern
[ad_1] It’s no secret that companies are making loads of cash using open source technology. A 2021 survey of 1,250 IT leaders commissioned by Red Hat found that 90% are using enterprise open source software. Following the trail of major acquisitions (Red Hat at $34B, GitHub at $7.5B, and MuleSoft $6.5B), it’s becoming more common to see companies built on open source valued at billions of dollars. With so much invested in open source infrastructure, many companies will assign employees to work on specific important issues for the projects they depend on, or hire them to support these projects full-time. This is an effective way to support maintainers when it works out but sometimes projects need to be able to funnel support to those who can further the software but who don’t happen to work for one of these corporations. Open Collective is exploring a new way for individuals and companies to give back to the projects they use by donating public stock. The new initiative is called Open Stocks. It allows donors to support open source without having to pay capital gains tax on the appreciated amount of their stocks, which is up to 37% for those based in the US. They receive a tax write-off at the current market value of the stock. Donating some of those profits is one way to lessen the tax burden for capital gains while keeping the open source software alive that made the public stock possible in the first place. Open Stocks is using Overflow, a VC-backed philanthropy platform, to streamline the stock donation process, which may have the potential to increase the average donation amount for open source projects. The startup claims “the average stock donation through Overflow is 47X the average online ACH/debit/credit donation.” Here is how it works: Donors select the open source collective they want to support and then proceed to the checkout process, which happens on the Overflow website app. Donors are asked to connect directly to their brokerage account by authenticating through the app. The Open Source Collective team will receive the donated stock converted to cash and the cash is then transferred automatically to the specified project’s balance with a public contribution notice on their page. It is not very clear up front for donors what fees they will have deducted from their total donation. Open Collective did not publish this information, and it wasn’t available on the Overflow website. Open Collective co-founders were not immediately available for comment on this. All currently-registered collectives are automatically able to receive stock donations. The announcement hints at future support for non-traditional forms of payment: Stocks and shares are a huge part of the economic power of traditional geopolitical structures, and while we believe that equivalent access to those structures is a positive move for the communities we support we can’t ignore that the world is changing… how we embrace and organize around that change may have an even bigger impact on our work. Open Collective co-founder Pia Mancini confirmed on Twitter that donation via cryptocurrencies is next on deck for the organization in its efforts to support open source creators. Like this: Like Loading… [ad_2] Source link
Continue readingApplications for In-person WordCamps Now Open
[ad_1] Hey, WordPress fans. We are checking in with your latest dose of weekly WordPress news. This week, WordPress opened the applications for in-person WordCamps. Those who are interested must meet the updated community guidelines for organizing the event during a pandemic. Beyond that, the 2021 WPMRR Virtual is happening on September 21, 22, and 23. This 3-day free online conference aims to help people responsibly grow their monthly recurring revenue. You can reserve your seat for this event here. We also have a lot of news, tutorials, and roundup posts for you as usual. Let’s get to all of this week’s WordPress news… WORDPRESS NEWS AND ARTICLES TUTORIALS AND HOW-TOS RESOURCES [ad_2] Source link
Continue readingElastic Hits Back at OpenSearch, Making Client Libraries Incompatible with Amazon-led Open Source Fork – WP Tavern
[ad_1] After Elastic, makers of the search and analytic engine Elasticsearch, re-licensed its core product so that it was no longer open source, Amazon led a community effort to fork it. In July 2021, contributors to the project announced the first general availability (GA) release of OpenSearch 1.0, an Apache 2.0-licensed fork of Elasticsearch 7.10.2 and Kibana 7.10.2. In what appears to be a slap back at the open source fork, Elastic has begun making its client libraries incompatible with OpenSearch. The Python client was updated to perform an API request that will verify connection to Elasticsearch and raise an error if it doesn’t receive the proper response. The PR received 40 “thumbs-down” reactions from the community and a brief round of criticism before the discussion was shut down. “It’s disappointing to see this,” Invenio product manager Lars Holm Nielsen said. “You’re forcing us as bystanders in a battle to choose sides. We develop an Open Source product that could likely easily work with both Elasticsearch or OpenSearch and then the users can choose for themselves if they want Elasticsearch or OpenSearch. “Now, instead, we likely have to make choice for all our users if we want OpenSearch or Elasticsearch. This and other behaviors from Elastic really does not give me any confidence in Elastic and what you might do in the future. And don’t blame it all on Amazon – you’ve already changed the server license, you didn’t have to make this move.” Elastic Senior Engineering Manager Philip Krauss responded before turning off comments on the discussion. “Amazon OpenSearch is a different product,” Krauss said. “And while there is some shared history, there are already many differences that cause real confusion and issues.” Elastic has also modified its .NET Connector for Elasticsearch to include “a pre-flight check on first use,” which users do not consider to be an enhancement. Elastic Senior Engineer Steve Gordon said the change is not breaking in supported configurations and that the intent was “to make this incompatibility explicit by failing fast to avoid consumers incorrectly assuming they are running in a supported configuration which is not tested and may not function as expected.” Last week, OpenSearch responded to Elastic’s recent changes that render many clients incompatible, by committing to create a set of new client libraries that make it easy to connect applications to any OpenSearch or Elasticsearch cluster: Many developers who use Elasticsearch and OpenSearch in their applications also make use of the open source client libraries maintained by Elastic, which provide convenient high-level interfaces for several popular programming languages. Over the past few weeks, Elastic added new logic to several of these clients that rejects connections to OpenSearch clusters or to clusters running open source distributions of Elasticsearch 7, even those provided by Elastic themselves. While the client libraries remain open source, they now only let applications connect to Elastic’s commercial offerings. OpenSearch published a list of a dozen clients for which contributors plan to create forks that will maintain compatibility with all Elasticsearch distributions, even those produced by Elastic. “We do not recommend updating to the latest version of any Elastic-maintained clients, as this may cause applications to break,” OpenSearch maintainers urged users in the latest project update. Elastic’s decision to prevent official clients from working with open source forks has further undermined any remaining goodwill the company had after re-licensing Elasticsearch. “Looks like Elastic has sucked all the benefit they could from open source and is now spitting out the bones,” OSI Director of Standards and Policy Simon Phipps said. 10up, makers of the ElasticPress.io service, one of the most prominent Elasticsearch-powered products in the WordPress ecosystem, is still considering its next move after Elasticsearch abandoned its open source licensing. The company is not in any hurry to choose sides. Vasken Hauri, 10up’s VP of Platforms and Systems, said the dispute “isn’t something that we’re concerned about in the near term (the next 2-3 years).” Upgrading past Elasticsearch 7.11+ would require making a choice between continuing on with Elastic’s proprietary offering or switching to the open source fork. Hauri said that the company is “barely taking advantage of most of the features Elasticsearch offers now” and projects that the current roadmap “could probably run another couple of years without any need to get new features from Elasticsearch.” For the time being, the 6,000+ users of the ElasticPress WordPress plugin and customers of the ElasticPress.io service have nothing to worry about as a result of Elastic’s renewed war with Amazon. Like this: Like Loading… [ad_2] Source link
Continue readingOpen Survey for WordPress Theme Authors on JSON Files and Block Themes – WP Tavern
[ad_1] WordPress 5.8 introduced an opt-in system for themes to configure block settings, styles, templates, and more. It is done through a new theme.json file that authors can put at the root of their theme folders. Anne McCarthy, the lead of the FSE Outreach Program, announced a survey earlier today to get feedback from developers on this feature. “Since this new mechanism is an early step towards a comprehensive style system for the future of WordPress, it’s important to hear from everyone who is currently using theme.json to learn more about how folks are using this tool and what might make sense to include in Core going forward,” she wrote in the announcement. The survey is open to all theme authors who have used theme.json, giving them a chance to put in some early feedback and help steer the ship going forward. Because I have worked extensively with this system over the past few months, I had a few things to say. Plus, I just like participating in WordPress-related surveys. I also decided it would be an opportunity to share some of my unfiltered thoughts from a development perspective on the current state of theme.json. What follows are my responses to the survey’s questions — well, the tidied-up version. Note: This is a developer-centric post that might not universally appeal to all of our readers. I have attempted to explain some things in user-friendly terminology, but some prerequisite knowledge of theme development may be necessary. Experience The first question of the survey is pretty cut-and-dry. It asks what your experience is with building block themes or using theme.json. It provides four choices (and an “other” option): I have built and launched block themes. I have experimented with building block themes. I have explored using theme.json with a classic theme. I have used a block theme, but I have not built one yet. I chose the first option because I have already built two block themes for family and friends. These were simple personal sites that I already maintain for free — honestly, I need to start charging. I am also working on a theme that I hope to release publicly. How It Started and How It’s Going The second question asks how one got started with block themes and theme.json. The choices are between forking an existing theme, using the Empty Theme, or starting from scratch. Again, this is one of those things where I have experimented with each direction, but I cannot remember the exact starting point. The bulk of my work has come from forking a theme that I last worked on in 2019. I plan to release this as a new theme for free at some point. I am mostly waiting on the following: Navigation block development to settle down The Post Author block to be split into smaller blocks A robust set of comment-related blocks Post Featured Image block to have a size option I think I could realistically release a use-at-your-own-risk beta version of my theme today if those items were addressed. Templates and Template Parts The survey asked which templates and template parts themers always include in their block-based themes. There was a freeform comment field — steps upon soapbox… I have a love/hate relationship with block templates at the moment. The static nature of HTML templates reminds me of simpler times when theme development was less complicated. However, this also presents a problem in a dynamic system. I cannot remember the last time I have built a traditional, PHP-based theme with more than one top-level template: index.php. The dynamic pieces have always been the guts of the thing, which are template parts. With PHP, it is easy to set some variable or use a function call to contextually load the templates parts necessary for whichever page a visitor is currently viewing on a site. The block template system does not work like that. It essentially forces developers into breaking the Don’t Repeat Yourself (DRY) principle. For example, if a designer wanted to display a different header template part for pages and posts, they would only need to create a header-page.php or header-post.php template in traditional themes. However, because the block template system is different, they must now create two top-level templates, single.html (post) and page.html, to accomplish the same thing. This is a “bad thing” because theme authors must duplicate all the other code in each of the top-level templates. There is no way to contextually load different template parts. To answer the question: I am using almost all of the possible top-level templates out of necessity. I also answered the second part of the question and listed my most commonly used template parts (broken down by hierarchy): Header Content– Loop– Sidebar Footer The content-*.html and loop-*.html template parts are those with the most variations. Defining Colors The next section of the survey asks how theme authors define their color palette slugs in theme.json. Believe it or not, naming colors may be the most controversial topic in the theming world in years. The only two things generally agreed upon are “background” and “foreground” colors. Morten Rand-Hendriksen opened a ticket in 2018 for standardizing a theme color naming scheme. It was not the first discussion and has not been the last. The problem it was meant to address was the slugs for colors in the system, which is how themes define their palettes. Once a user makes use of a preset color, the slug is hardcoded into their content. Switch to another theme with different slugs, and the old colors disappear and do not automatically change to the new theme’s colors. I use semantic names that follow something that closely resembles the Tailwind CSS framework’s shading system. Instead of red-medium (descriptive), I would use primary-500 (semantic), for example. A semantic approach would allow theme authors to define a set of colors that are updated each time a user switches themes. Of course, there are other schools of thought, and even everyone who prefers
Continue reading