• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
NameHero® Blog

NameHero® Blog

Web Hosting Tips & Resources From NameHero

  • AI Agents
    • OpenClaw
    • Claude Code
    • n8n
    • Hermes Agent
    • Open WebUI
    • Docker
  • Hosting
    • Web Hosting
    • WordPress Hosting
    • WooCommerce Hosting
    • Enterprise Hosting
    • Email Hosting
    • HeroicGuard
    • GPU Hosting
    • Website Builder
  • VPS
    • Managed VPS
    • Unmanaged VPS
    • Flex VPS
  • Reseller
  • Gaming
  • Domains
  • Account
  • Blog Home
  • Categories
  • Authors

How To Create An Archive Page In Genesis

Bhagwad Park

Published on: June 2, 2022

Categories: WordPress 0

Earlier, I’d written about how to create a category page in WordPress using the new and improved WordPress 6.0 Query Loop block. Unfortunately, this doesn’t work if you want to include all post types. The query loop block has an option on the right-hand side that allows you to choose either posts or pages for display. It doesn’t let you choose both. Here’s a screenshot:

WordPress Query Loop Block only Shows Posts OR Pages - Not both at the Same Time
WordPress Query Loop Block only Shows Posts OR Pages – Not both at the Same Time

By default, WordPress doesn’t allow you to add categories and tags to pages – only posts. A while back, I’d written an article on how add tags to WordPress pages. This is very useful, particularly if you’ve already created some pages and want to belatedly add tags to them. That article also included code to include both posts and pages in any tag query. Otherwise, even if you added tags to a page, they wouldn’t show up in the tag archives.

But the new Query Loop block has its own code and it can only show pages or posts. So while an ordinary archive page will show both post types, the Query Loop block from WordPress 6.0 will not. So we’re back to creating a page using an in-built template to get the results we want.

Since I use the Genesis theme on my website, I thought I’ll show you how to create an archive page using the “Blog” template on Genesis that only displays posts and pages from a single tag. You can modify this to show any category, or multiple tags, depending on the options you set using the “query_args” parameter as shown below.

Create a Page Using the “Blog” Template

Strangely, to create an archive page in Genesis, you should use the “Blog” template, and not the Archive template. The latter will output a sitemap-like list of titles, and doesn’t have the pagination you would expect from a category or a tag archive. So fire up a new page, and select the Blog template like this:

Choose the Blog Template in a Genesis Page
Choose the Blog Template in a Genesis Page

The Blog template has all the necessary tools to display a list of posts with featured images, excerpts, and “Next” and “Previous” pages as you would expect.

Crafting the “query_args” Parameter

By default, the blog template shows you a list of everything. But you can select what to show by properly constructing a “query_args” parameter. Here’s the full documentation for query_args, but it’s best illustrated with some examples:

To show only items tagged with “tech”:

tag=tech

To show items in tags 3 and 4:

tag__in= array( 3, 4 )

To show items in category 5:

cat=5

Exclude categories 7 and 8:

cat=-7,-8

Once you’ve figured out what kind of query_args parameter you want, scroll down to the bottom of the page editor till you come to a section labeled “Custom Fields”. Here, click “Enter new”, and in the “Name” field, type “query_args”, and in the “Value” field, type in the parameters you just determined. For example, I want to only show items tagged with “tech”. So my Custom Field screen looks like this:

Use the Right Query_Args Value
Use the Right Query_Args Value

Now save and publish your post. For me, this is the output:

Output Showing Posts and Pages from a Single Tag
Output Showing Posts and Pages from a Single Tag

As you can see, I have one page and one post tagged with “tech”, so both of these show up as expected. Note that this is only possible because I’ve implemented the code to add tags to pages, and got them to show up when tags are queried. If you want to do the same thing with categories, you need to modify the code accordingly.

Who knows, in the future, WordPress might expand the Query Loop Gutenberg block to allow us to include all kinds of post types, and not just either posts or pages. But until that happens, we have to continue using templates to achieve the results we want.

Bhagwad Park Profile Picture
Bhagwad Park

I’m a NameHero team member, and an expert on WordPress and web hosting. I’ve been in this industry since 2008. I’ve also developed apps on Android and have written extensive tutorials on managing Linux servers. You can contact me on my website WP-Tweaks.com!

Related Posts

How To Back Up Your WordPress Site (And Why You Should Do It Today)

In this post, we’ll take a closer look at why backups matter. We’ll also show you different ways to back up your WordPress website.

How to Eliminate Render-Blocking Resources in WordPress (& Why You Should)

Many things can slow down your site, including render-blocking resources. These are CSS and JavaScript files that delay the loading of content on your site. As a result, visitors will have to wait longer to interact with your page, which could lead to frustration and instant exits.  So, what can you do to eliminate render-blocking […]

Blogger vs. WordPress: Which One to Use?

Let's compare WordPress and Blogger across five key areas. Then, we'll show you how to set up a professional blog with WordPress.

Joomla vs. WordPress: Which One Is Better?

In this post, we’ll consider five differences between Joomla and WordPress and how you might go forward with setting up a WordPress website.

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Follow & Subscribe

Exclusive promos, content and more!


Most Popular Posts

NameHero’s Recommended WordPress Plugin and Theme Setup

WordPress Hosting vs. Web Hosting – What’s The Difference?

How To Increase The InnoDB Buffer Pool Size

How To Fix A Stuck All-in-One WP Migration Import

How To Add A Subdomain In Cloudflare

Top Categories

  • WordPress
  • WordPress Tutorials
  • OpenClaw Hosting
  • Enterprise Hosting
  • WooCommerce
  • Web Hosting
  • Resellers
  • Website Security
  • Website Development
  • Website Performance
  • VPS Hosting
  • SEO Tips
  • Announcements
  • Domain Registration
NameHero

NameHero® proudly provides web hosting to over 40,000 customers with 99.9% uptime to over 750,000 websites.

  • Master Card
  • Visa
  • American Express
  • Discover
  • Paypal
Products
  • Web Hosting
  • Managed VPS Hosting
  • Unmanaged VPS Hosting
  • Flex VPS Hosting
  • WordPress Hosting
  • WooCommerce Hosting
  • Reseller Hosting
  • Enterprise Hosting
  • GPU Hosting
  • Email Hosting
  • HeroicGuard
  • Domains
  • Website Builder
  • AI Agent Hosting
Help & Support
  • NameHero Blog
  • NameHero Gaming Blog
  • Support
  • Help Center
  • Migrations
  • Affiliates
  • Gaming Affiliates
  • Call 1-855-984-6263
Company
  • About Us
  • Contact Sales
  • Reviews
  • Uptime
  • We're Hiring

Copyright © 2026 Name Hero, LLC. All rights reserved.
NameHero® is a registered trademark.

  • Privacy Policy
  • Terms of Use
  • Acceptable Use Policy
  • Payment Policy
  • DMCA