Configure Cypress Tests to Run on Multiple Environments

One of the most common scenarios in an automation framework is to run scripts on different environments like QA, staging, production, etc. There are multiple ways to configure your Cypress framework to run on different environments. I am going to show the three most used methods

In this article, I have explained 3 different methods to run your Cypress tests on multiple environments.

The Beginner’s Guide to LLC vs. C-Corp

Your choice of business entity directly affects your business’s bottom line. It’s why business owners want a clear-cut answer to the classic LLC vs. C-Corp debate.

In both cases, you’re shielded from corporate liability. But there are a few notable differences crucial for you to understand. In this guide, I’ll detail their similarities and differences to help you decide the better entity structure for your business.

Let’s dig right in.

What are LLC and C-Corp?

Let’s take a look at what an LLC and C-Corp mean.

What’s an LLC?

A Limited Liability Company (LLC) is a U.S. business structure set up under state statutes that can be used to own and run almost any type of business. It combines the zero-formality and flexibility attributes of a sole proprietorship or partnership, along with the limited liability protection reserved for corporations.

Since owners can’t be sued for their personal assets, LLCs are a great option for people who want an entity to hold its real estate or other appreciating assets. Even investors and entrepreneurs prefer it because of the tax flexibility and asset protection.

It’s important to note that the IRS doesn’t recognize the LLC business structure for federal taxes. You have to decide between a default tax method or choose to be taxed as a distinct IRS-recognized business entity.

What’s a C-Corp?

Contrarily, a C-Corp or C Corporation is a legal and IRS-recognized business entity that allows businesses to keep their profits in the business. It has an intriguing double taxation effect, which is also one of C-Corps’ distinguishing features.

Here, the company (being a separate legal entity) first pays income tax at the corporate level, after which the shareholders pay income tax on the dividends received from the corporation.

Similar to an LLC, a C Corporation’s legal structure limits the financial liabilities of all owners.

C-Corps are a great option for businesses selling products or having a storefront or employees. However, I wouldn’t recommend it for service-based businesses because of specific tax laws applied to Personal Service Corporation (PFC) that increase payable taxes. Even businesses holding appreciating assets should avoid it due to the tax treatment of asset sales.

The Basics of LLC vs. C-Corp

Read on as I break down the key differences and similarities between an LLC and C-Corp.

Ownership

An LLC’s ownership can be held by a single individual or a group of people. But a C Corporation’s ownership is divided jointly among all its stockholders and shareholders that can potentially be hundreds—or even thousands—in number.

You’ll find most household-name corporations are C-Corps. Technically speaking, anyone who owns stock in any of these corporations is among the company’s owners.

Formation

Although the formation process for both an LLC and a C-Corp is the same for the most part, the additional paperwork is different.

The initial registration paperwork for both corporate structures is similar. But while an LLC must have an operating agreement outlining the company’s financial and operational procedures, a C-Corp needs to come up with corporate bylaws detailing its members, officers, committees, among others.

Additionally, forming a C Corporation comes with additional stipulations that go beyond paperwork.

Unlike an LLC, C-Corps have to elect a board of directors, issue stocks and shares, and hold regular board and shareholder meetings. Company bylaws should outline all these responsibilities and address how they plan on fulfilling them.

If you plan to form an LLC, check out our top picks for LLC services available today.

Capital Raising

As mentioned above, anyone who buys the C Corporation stock technically owns a share in the company. It’s why C Corporations have it far easier when it comes to raising money than LLCs.

You see, ownership of C-Corp stocks generally includes the prospect of selling the stocks for higher prices later, which, in turn, makes the incentive to invest in the higher.

On the other hand, expanding an LLC’s ownership to include stockholders is out of the question. If you register your LLC as a C Corporation for tax purposes, you still won’t be able to issue stocks in your company. To do so, you have to form a new corporation.

This makes fundraising for LLCs even more challenging.

What’s more, C Corporations have it easier when it comes to obtaining foreign investment as well. They don’t have to revise their bylaws to accommodate foreign investments as anybody can buy stock in their company. However, an LLC will have to amend its articles of organization to secure a foreign entity investment.

Interestingly, when foreign investors purchase American real estate, they usually register as LLCs to avoid estate taxes.

Taxation

A C-Corp pays a flat-rate corporate income tax of 21%, after which its owners pay personal income taxes, including taxes on the dividends they receive from the corporation. So if you consider incorporating as a C Corporation, you have to be prepared for double taxation.

Additionally, a C-Corp has the widest range of deductions and expenses out of all the entities. For instance, you can set up employee benefits and then deduct the costs associated with running these programs from your corporate taxes. It’s also worth noting that here, you pay an initial rate of 15% on all earnings after $50,000.

On the other hand, the federal tax obligations for an LLC involve you choosing to classify your business as either a C-Corp or a pass-through entity (sole proprietorship, partnership, S-Corp) to avoid double taxation. Choosing between a pass-through entity and C Corporation is entirely up to you. It’s interesting to note that no other entity has this flexibility.

Imagine you own a shop with a business partner with whom you equally share the business, and the shop generates $200,000 in business profits for a specific year.

When you have a C-Corp, you’ll have to pay a 21% corporate rate tax on the profits, i.e, $42,000. Then, if you take out $50,000 in dividends, you’ll also have to pay a dividend tax rate (15%) on that amount, which will amount to $7,500. As such, the tax burden will end up being $28,500 ($21,000 + $7,500) for each partner.

On the other hand, if you had an LLC taxed as a pass-through entity, you and your partner will have to each pay taxes on half of the business income—$100,000—on your personal tax return. As the income tax bracket for this amount is 24%, your tax bill would amount to $24,000 each.

Limited Liability Protection

As mentioned before, both a C-Corp and an LLC provide limited liability protection to owners, where their owners’ assets are protected from getting seized to pay for the corporation’s debts and liabilities.

For more context, the owners are only liable for the amount they invest in the company—never for the corporation’s liabilities.

5 Tools to Improve LLC vs. C-Corp Incorporation

Business formation service tools, as the name suggests, can help you establish your entity, irrespective of whether you choose to form a C-Corp or an LLC. Below is a list of the five best incorporation services to set you up for success.

IncFile

Over 500,000 businesses have used IncFile to kickstart their business. So you can imagine the kind of reputation and trust this service enjoys on the market, and honestly, it’s easy to see why.

IncFile is a fast and convenient incorporation service that provides you with top-notch offerings for LLCs and C Corporations. It’s also super affordable, allowing you to form your business for free—you only have to pay the state filing fees.

You get access to several amazing features, including company name availability verification, preparation, and filing of articles, next-day processing, and online status checking and document access. Free tax consultation services and lifetime customer support are additional benefits.

ZenBusiness


If convenience and speed matter to you, ZenBusiness‘s LLC services, incorporation services, and registered agent services are just what you need.

Despite being founded in 2015, ZenBusiness has managed to climb its way to the very top, thanks to its highly responsive staff, efficient service, and a worry-free guarantee. What’s more, all its plans come with name availability search, online document access, free account in consultation, and registered agent services, among others.

While the service has a wide range of offerings, I highly recommend it for the LLC services. It handles everything for you, including filings for Certificate of Formation and Articles of Organization, choosing a registered agent, applying for your EIN, and so on.

BetterLegal

BetterLegal assures customers a fast turnaround time, upfront pricing, and a seamless and painless user experience.

Filling the necessary forms hardly takes about 10 minutes, after which the service will commence and complete the LLC formation within two days. You also get access to a large resource center where you can read and learn more about business management.

BetterLegal doesn’t offer a free registered agent on the packages, which is slightly disappointing. But it still has tons of useful features to help you incorporate your business online.

Rocket Lawyer


Rocket Lawyer makes legal services easily available to the average person at an affordable rate.

Its team includes experienced attorneys to answer all your legal queries. Rocket Lawyer has a lawyer directory where you can connect with an expert to consult with on a certain legal topic within minutes. Moreover, you can also choose your state to connect with someone knowledgeable about your state and local laws.

Plus, you can contact your allotted attorney any time you want—via phone, mail, or chat—for advice during the business incorporation process. Rocket Lawyer will take care of everything, from starting your business to managing it post-launch.

Inc Authority


Here’s a shocker: Inc Authority charges no money to incorporate your business. And no, there’s no catch for you to worry about.

Its entity setup process involves zero cost, except for the fees required to your state. You can avail of this service without having to sign up for a free trial or pay for a subscription plan or an upsell.

Inc Authority’s business plans further include beneficial features, like business name check, preparation and filing for entity formation documents, tax planning consultation, digital document storage, and Form 2553 preparation and filing.

3 Tricks to Decide The LLC vs. C-Corp Debate

Now that we’ve covered the basics of LLCs and C-Corps, let’s review a few factors to help you decide between them.

Think About Ownership

You can think of starting an LLC if you want more control over your business. This will allow you to make your own decisions without having to compromise or consider someone else’s values. At the same time, you’ll also be solely responsible for the fate of your business and the risks you take.

In the case of a C-Corp, you’ll have to answer to a board of directors—even if you’re the sole owner of a corporation. Addressing shareholder concerns is another factor.

Consider Your Tax Situation

Filing taxes for an LLC is very simple—provided you choose to be taxed as a single-member entity. You don’t have to separate your personal tax records from your company tax records.

But if you’re okay with the concept of double taxation, a C-Corp would be a better option, especially considering the wide range of deductions and expenses you can deduct from your corporate taxes.

Think About Funding

C-Corps offer more ways to bring in investors (Eg: Common stock, preferred stock). However, having stocks also represents an ownership interest and can lead to owners selling their control of the company in exchange for funding.

Deciding to incorporate as an LLC will put you in a better position to get a loan. An LLC member, such as an owner-operator, can easily use their homes or real estate as collateral for the loan—something that C-Corps cannot.

What to Do Next

I hope this guide will help you make the right choice between an LLC and a C-Corp based on your requirements.

After making a decision, you need to work on launching your business and kickstart operations. Use a reliable incorporation service to launch your business, and then create a solid business plan to outline how to proceed next.

Remember, having a plan is always better than just winging it. Here are a few more QuickSprout articles to guide you in the right direction:

Engineering Productivity and Culture at Netflix

What is it like to work at Netflix as a developer? How do they think about culture, customers and engineering productivity?

In this incredible episode of Dev Interrupted, I bring in Kathryn Koehler, the Director of Productivity Engineering at Netflix, to chat about what makes Netflix so unique and why they are standardizing data-driven engineering today.

How Good Is Python for Blockchain Development?

With the growing interest in blockchain, the choice of technologies for creating blockchain solutions is becoming one of the main issues. Python is often ranked among the top tools for creating blockchain-based projects. According to StackOverflow’s 2019 developer survey, this programming language entered the top 5 most popular languages among developers. Moreover, according to the TIOBE rating, Python ranks as the second most popular programming language as of June 2021. So let's see how exactly this technology is attracting engineers around the world and what role it plays in blockchain development.

Blockchain Development Without Complications

Most often, the first thing you hear about Python is that it's pretty simple. It is easy to learn so even novice developers can contribute to the development of open-source projects. To understand how this simplicity benefits blockchain developers, let's go through the process of building blockchains. 

Simple Code: Immutability

Immutability is a special thing that in my mind deserves a short explanation and praise.
If you're familiar with functional programming you surely recognize the concept of immutability because it's a key ingredient of the paradigm. In the world of object-oriented programming, it's not as used and as easy to use approach but there are ways to incorporate immutability to parts of the code and I strongly suggest you do so too.

Quick Intro to Immutability

The basic idea of immutability is unchangeable data. 

Lead Generation Strategies for SaaS

Introduction

Think of your SaaS business as an orchard. If you don’t tend the trees, they won’t bear fruit. Similarly, if you don’t maintain your services, you won’t make a profit. Generating leads for your business is an essential step in maintaining your business’s health and growth. We’re here to show you why and how lead generation can work for you! 

What Is Lead Generation?

A lead is someone who has shown an interest in your product, to the point where they’ve given you their information. You’ll need to nurture this interest to turn it into customer action, as well as generating more leads for your business. 

Static Website Generation With Java and Maven (JBake)

Last week, we migrated the entire www.optaplanner.org website (1399 files) to build with Java and Maven, instead of Ruby and Rake. On the face of it, nothing changed. But in the sources, for our team of Java developers, it is a game-changer.

Our java team can now contribute to the website easily. Within hours of completing the migration, there was already a commit of one of our developers who would rather not touch the previous source code with a ten-foot pole.

Incorporate.com Review

Incorporate.com has more than a century of experience in the business formation space. It’s a branch of Corporation Service Company (CSC) that was founded back in 1899.

Naturally, the business has changed quite a bit over the last 122 years. Today, Incorporate.com serves as a fast and easy way to form businesses online. As a pioneer and industry leader in this space, more than 750,000 LLCs and corporations across the country have been started with Incorporate.com.

They offer a wide range of services to start a business, maintain a business, and everything in between. From obtaining an EIN to S-corp election and business licenses, Incorporate.com has it all.

Is Incorporate.com right for you and your business? Use this guide to find out.

Sign up for Incorporate.com today.

Incorporate.com Business Formation Services

As previously stated, Incorporate.com offers a plethora of services. But its business formation plans are definitely the most popular, so that’s what the bulk of this review will focus on. Those formation services can be segmented into three main categories—LLC services, incorporation services, and registered agent services.

Continue below to learn more about the packages, pricing, benefits, and discover what real customers have to say about Incorporate.com for business formation.

Incorporate.com LLC Services

You can use Incorporate.com to form an LLC (limited liability company) in all 50 states. Once you select your location and entity type, filling out the rest of the application is a breeze.

Incorporate.com asks a handful of simple questions about you and your business. From there, the formation experts handle the rest. This includes all of the paperwork preparation and legal filings for your LLC.

Essentially, your job is over after you complete the online application. It’s just a matter of waiting until the LLC is officially formed with your state.

Incorporate.com offers three different LLC formation packages for you to choose from:

  • The Starter — $99 + state fees
  • The Essentials — $249 + state fees
  • The Works — $349 + state fees

All plans come with access to the CSCNavigator, an online business compliance tool designed to keep your LLC in good standing. It comes with benefits like filing alerts, unlimited document storage, a to-do list, and order status tracking.

Incorporate.com prepares and files all of your LLC formation documents with your secretary of state, regardless of the plan you choose. All packages come with a $75,000 corporate compliance guarantee and instant online access to all of your LLC’s filed paperwork.

For those who want a bit more than the basics, the Essentials package comes with an EIN (tax ID) and corporate kit.

The Works package comes with all Essentials services, plus an LLC operating agreement and a business license research package.

It’s worth noting that some of these services are only available to customers who use Incorporate.com as their registered agent. We’ll discuss this in greater detail shortly.

Once you select a plan, you’ll automatically be directed to the online LLC application. This form can be completed in roughly ten minutes or less.

Between the low cost and outstanding service, Incorporate.com should be a top consideration for anyone who wants to form an LLC.

Incorporate.com Incorporation Services

Incorporate.com offers corporation formation services for C-corps, S-corps, and nonprofits. The process is similar to the LLC services described above. But the application questions will be a bit different based on the entity type you choose.

For those of you who aren’t sure which corporate entity structure is right for your business, Incorporate.com has some great resources on their website to help you decide. You can even consult with one of their customer support representatives for more information and guidance.

Here’s a quick overview comparing C-corps and S-corps:

Most of you will be choosing between one of these two options. But as previously stated, you can also form a nonprofit through Incorporate.com.

The price remains the same no matter which corporate entity type you select. The packages are identical to the LLC services offering three plans—The Starter ($99), The Essentials ($249), and The Works ($349). You’ll still have to pay state filing fees in addition to these base rates.

All packages include the completion and filing of your corporate formation documents. You’ll get a $75,000 corporate compliance guarantee, access to a robust online dashboard, and online access to your incorporation documents.

The Essentials package comes with an EIN and corporate kit. This package also includes annual report preparation and filing with your state.

As the name implies, The Works has it all. In addition to all of the Essentials features, it includes corporate bylaws and a business license research package.

At the end of the day, Incorporate.com is a solid choice for any business that wants to incorporate. If you’re still on the fence and unsure which entity structure is right for you, check out the resources on their website. They explain the different options in greater detail and even have a guide that compares corporations to LLCs.

Incorporate.com Registered Agent Services

Regardless of the entity type you’re forming, your business must have a registered agent. Getting this service from the same provider you’re using to start your business makes the most sense.

Incorporate.com’s registered agents will help your business maintain compliance.

They will become the state’s official way of communicating with your LLC or corporation. Any service of process, legal documents, or tax documents will be accepted by Incorporate.com on behalf of your business. This includes things like notifications from the Secretary of State, lawsuits, government notices, and more.

One of the most significant benefits of using Incorporate.com as your registered agent is the CSCNavigator. This online tool comes with perks like:

  • Filing alerts
  • Calendar of important filing dates
  • Order status tracking
  • Current status of your business standing with your state
  • Document storage and access

Overall, the tool is really helpful. You can be alerted in real-time if your registered agent receives an urgent notice on your behalf and access everything online.

The registered agent services from Incorporate.com cost $235 per year.

If you’re using Incorporate.com to form an LLC or corporation, getting the registered agent service is a no-brainer.

Overall Pricing and Value

We’ve mentioned the pricing a few times throughout this guide, but let’s take a more in-depth look at Incorporate.com’s packages and rates. This will make it easier for us to determine their value.

The packages for all business formation services are the same, regardless of the entity type you select (LLC, C corporation, S corporation, or nonprofit).

The Starter — $99 + state fees

  • Completion and filing of formation documents
  • CSCNavigator (online tool)
  • $75,000 corporate compliance guarantee
  • Online document access

The Essentials — $249 + state fees

  • All Starter services
  • Annual report preparation and filing
  • Corporate kit
  • EIN (employer identification number)

The Works — $349 + state fees

  • All Essentials services
  • Business license research package
  • LLC operating agreement
  • Corporate bylaws

The registered agent services cost $235 per year.

Interestingly enough, some of the services “included” with these packages are only available to customers who use Incorporate.com’s registered agent service. The CSCNavigator tool and the annual report preparation and filing service are both on that list. So, if you’re not using Incorporate.com as your registered agent, there isn’t as great a value with these packages.

With that said, it makes sense to use their registered agent services if you’re getting a formation package from Incorporate.com. It’s just easier, and there really aren’t many reasons to get these from separate providers.

At $235 per year, the registered agent plan is a bit high compared to others on the market today. But as we’ve seen from reviews, customers are happy with the service.

User Experience

Navigating the Incorporate.com website and getting started with the formation process is simple. Everything is straightforward and effortless to follow.

Incorporate.com does a great job explaining your options. Just pick your state, choose your entity type, and select a package.

From there, the application shouldn’t take more than ten minutes. You’ll be offered a few upsells, like expedited EIN processing and expedited shipping via FedEx, but it’s just a couple of extra clicks to bypass those.

Here’s an example of some questions on the application:

Incorporate.com will ultimately take your responses and use them to complete your formation paperwork.

Once you’re up and running, you’ll have access to the CSCNavigator (assuming you’re using the registered agent service).

This online tool is both robust and intuitive. It’s an easy way to see crucial business information related to your new entity. If you have a filing deadline coming up, you’ll be alerted to ensure compliance.

Customer Support

If you browse through online reviews, you’ll find nothing but great things about Incorporate.com’s customer support team.

Remember, this organization is a branch of Corporation Service Company (which has been in business for over 120 years). There’s a certain level of professionalism that comes with so much experience.

Phone support is the best way to get in touch with Incorporate.com. Their team is available from 8 a.m. to 8 p.m. Eastern, Monday through Friday.

They are also available by email and typically respond to emails within one business day.

Final Verdict

Do we recommend Incorporate.com? Absolutely.

The business formation packages are perfect for anyone who wants to start an LLC, C-corp, S-corp, or nonprofit. Just fill out a simple application online, and they’ll handle the document preparation and filing on your behalf.

Incorporate.com also has registered agent services to keep you compliant once your business is officially formed. This is something your company needs, so it makes sense to get it directly from Incorporate.com.

Between the low costs, friendly service, and ease of use, Incorporate.com is an industry leader in the online business formation space.

Exceeded maximum execution time Exception in Google Apps Script

Google Apps Script is a serverless environment that makes it easy for you to work with Gmail, Google Drive and other services that are part of the Google Workspace platform.

When you run any code inside the Google Apps Script IDE, in simple English, it spins up a new server with the required environment that are necessary to run your application. This server is allotted a hard timeout limit and the App Script environment will halt the execution of the function if it exceeds the maximum execution time.

Exceeded maximum execution time

The maximum execution time varies based on the type of your Google Account. If you are running your Apps Script code inside a Gmail account, your functions can run for 6 minutes before it will be terminated. For Google Workspace accounts, because you are paying a monthly fee to Google per user, the timeout limit is more generous at 30 minutes.

If your Apps Script function / trigger exceeds the maximum timeout limit, the script will throw an exception like Exceeded maximum execution time or equivalent based on your script’s locale.

Exceeded maximum execution time
Se ha superado el tiempo máximo de ejecución.
Timpul maxim de executare a fost depășit
تجاوز الحد الأقصى لعدد مرات التنفيذ
Vượt quá thời gian thực thi tối đa
Durée d'exécution autorisée dépassée
Przekroczono maksymalny czas wykonywania
Limite massimo del tempo di esecuzione superato
เวลาประมวลผลเกินขีดจำกัดสูงสุด
Melebihi jumlah eksekusi maksimum
Превышено максимально допустимое время выполнения
Lumagpas sa maximum na oras ng execution

Avoid Maximum Execution Time Limit

You can include a simple time check in your Apps Script function, that it likely to take more than a few minutes to execute, and gracefully pause the request if is seen to be exceeding the time limit.

For instance, the Download Gmail add-on saves email messages from Gmail to Google Drive as PDF files. It grabs a bunch of messages from the Inbox, converts them to PDF and runs in a loop. If the execution is taking longer, it breaks from the loop automatically.

const GMAIL_USER = /(gmail|googlemail)/.test(
  Session.getActiveUser().getEmail()
);
const ONE_SECOND = 1000;
const ONE_MINUTE = ONE_SECOND * 60;
const MAX_EXECUTION_TIME = ONE_MINUTE * (GMAIL_USER ? 6 : 30);
const NOW = Date.now();

const isTimeLeft = () => {
  return MAX_EXECUTION_TIME > Date.now() - NOW;
};

const thisFunctionTakesTimeToExecution = () => {
  const threads = GmailApp.getInboxThreads(0, 100);
  for (let t = 0; t < threads.length && isTimeLeft(); t += 1) {
    // Save email to Google Drive
    Logger.log("Saving email...");
  }
};

Perl Debugger Superpowers, Part 2

Perl Debugger Superpowers, Part 2

In March I wrote The Perl debugger can be your superpower, introducing the step debugger as a better way to debug your Perl code rather than littering your source with temporary print statements or logging. I use the debugger all the time, and I've realized that some more techniques are worth covering.

Although I mentioned a caveat when debugging web applications, our apps at work all adhere to the Perl Web Server Gateway Interface (PSGI) specification and thus we can use tools like Test::WWW::Mechanize::PSGI or Plack::Test to run tests and debugging sessions in the same Perl process. (Mojolicious users can use something like Test::Mojo for the same effect.)

Query Loop: The Ins and Outs of One of WordPress 5.8’s Most Powerful Features

WordPress 5.8 is on deck for July 20, just a mere 10 days from now. The release is geared up to be the most feature-packed update the community has seen in a while. Block-based widgets, the pattern directory, WebP image support, template-editing mode, and many more tools are nearly ready to ship to the masses.

However, one of the most powerful features is the Query Loop block.

If you are unfamiliar with the terms “Query” and “Loop,” they are vital concepts within WordPress. Traditionally, they were only necessary for theme and plugin development. However, through the Query Loop block, users will gain exposure to what is, for all intents and purposes, the backbone of how WordPress displays posts on a site’s front end.

Queries? Loops?

Not everyone will be immediately familiar with these developer terms that WordPress is plopping down in the user interface. For theme and plugin authors, these are everyday concepts. However, even some users who have been using the platform for a decade have never been exposed to them. So, we should get some basic definitions in place.

The term “Query” is simpler than you might think. It merely means to “query” or “ask” for posts from the database according to a defined set of options. For example, one might attempt to get the last 10 blog posts.

“Loop” is an even easier concept to grasp. It means to “loop” or “cycle” through each queried post and output it. Technically, a developer could do things other than displaying the posts during this process, but we are only concerned with what gets printed on the screen.

The two things combined become the Query Loop block. It allows users to ask for a set of posts and display each one.

There is also a Post Template block, which throws a wrinkle in all of this. Aside from the word “template” being overused in WordPress for various features, this is a new method for an old concept. Traditionally, WordPress theme authors would write out all the HTML and call specific template tags within the queried posts loop to show things like the post title, author, content, and more. This is easy to do within a PHP file. However, in the block editor, there needed to be a new way to group these things together. The Post Template block acts as this group, housing the things users want to display in the Query Loop.

WordPress also has a variation on the Query Loop block called Posts List. They do the same thing, but the latter has a more user-friendly title than the former. The only problem with this variation is that, when it is inserted, the user still sees the same “Query Loop” block title. There is a ticket to fix this, but it is unlikely to make it into WordPress 5.8.

Query Loop Pattern Inserter

When first inserting a Query Loop into the editor, WordPress will introduce users to another version 5.8 feature: the pattern inserter. Instead of having immediate access to interact with the block, users can select from a list of predefined patterns.

By default, the inserter is a carousel that lets users can scroll through patterns individually:

A carousel/slider view of the available patterns for inserting into the WordPress editor.
Query Loop pattern inserter: carousel view.

However, they can switch to a grid-based layout and view all of the patterns at once:

A two-column, grid-based view of the available patterns for inserting into the WordPress editor.
Query Loop pattern inserter: grid view.

WordPress 5.8 is set to ship with six Query Loop patterns by default, unless more are added in the coming days:

  • Standard
  • Image at left
  • Small image and title
  • Grid
  • Large title
  • Offset

I am not particularly fond of any of the default patterns other than the “Large title” one (shown in the screenshots above with the black background and white text). For this block to shine, users will need to build out their own designs or wait for theme authors to begin bundling custom Query Loop patterns.

And, that is how it should be. Core WordPress should ship some basics while letting our community of theme designers showcase their craft.

A Query Loop pattern in the WordPress editor that shows the post date, title, and excerpt.
A custom simple blog posts listing.

This is also an opportunity for theme authors to offer alternatives to their custom page template designs. It is not time to throw them out entirely. However, it is a way to begin recreating old ideas in the block era, such as building out eCommerce plugin integrations, portfolio grids, and much more. Some of the tools are still limited (we are getting to those next), but there is enough initial groundwork for exploration, helping users experience WordPress in new ways.

Block Options

The Query Loop block has several options for users to customize which posts to query the database for:

A Query Loop block inserted into the WordPress editor. The block options sidebar and the display settings popover are both open.
Query Loop block and its options.

In the block toolbar, there is a “Display settings” button. When clicked, it creates a popover with options for how many posts to show:

  • Items per Page: Number of posts to display per page
  • Offset: Number of posts to skip over
  • Max page to show: Limit pages (this requires using one of the Query Pagination blocks)

The “Settings” panel in the Query Loop’s block sidebar has several secondary options. Users can enable “Inherit query from template” to use WordPress’s global query, but this is mostly useless for WordPress 5.8 users without the Gutenberg plugin enabled and a block-based theme. For now, you will almost always want to disable this option. This will grant access to a slew of new choices, such as:

  • Post type
  • Ordering
  • Filters panel for categories, tags, author, and keyword

The Settings and Filters panels are the most fine-tuned pieces of the Query Loop block. The development team struck a sensible balance between ease-of-use and the dozens of query-related parameters available through code. It provides users with a ton of power right of the gate but should be flexible enough in the future for plugin authors to extend.

The Post Template

When inserting a Query Loop, the editor automatically adds its inner Post Template block. This is where most of the magic happens. Users can directly change how their posts appear. Primarily, they will do so by adding blocks from the Theme category, many of which are for outputting post-related data.

Block inserter open in the WordPress editor, showcasing the blocks from the Theme category.
Theme-categorized blocks for outputting dynamic data.

Nearly all other blocks are available for insertion here too. However, many of them will not be great candidates for use within the Query Loop.

One thing that may not be immediately evident is that changes you make to one post within the Post Template block will affect all others. So, if you add a Video or Buttons block here, they will be identical. Remember, this is a “template” for designing how all posts within the Query Loop will appear.

The drawback for customizing the Post Template block output is the lack of design options for some of the blocks. It is easy to build something like a simple post list:

Single-column list of posts with their titles and published dates.
Posts list with titles and dates.

You can also build a layout like a portfolio project grid, as shown in the following screenshot. However, the Post Featured Image block does not currently have sizing controls, so you are stuck with your theme’s default post-thumbnail size — assuming it is actually registered. Experiences may vary. Wildly.

Three-columned grid of posts in the WordPress editor.
Building a basic portfolio grid.

For more advanced things than changing typography, colors, and spacing, users will need to wait for WordPress 5.9 and beyond. However, theme authors still have the block styles API at their disposal. I, for one, look forward to seeing what they do with it.