• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Startup Hero

The Official Blog Of Name Hero

Learn To Fly Above The Competition Get Started
  • HomeWelcome
  • CoursesVideo Training Center
  • About UsWhat is StartupHero?
  • BlogGet the latest
  • Start HereStartup 101
  • SpeakingPodcast & Media
  • ResourcesTools to help You
    • Reselling WordPress Hosting
    • Resell Hero
    • How To Start A Blog
  • NameHeroCloud Web Hosting

How To Create A New Category Archive On WordPress

By Bhagwad Park on May 31, 2022 0

How To Create A New Category Archive On WordPress

In my last article, I’d written an article about how to replace the WordPress category archive with a custom page that you can edit using Gutenberg. That solution works wonderfully for what it’s meant to achieve. However, in replacing the default functionality, you now don’t have a page that shows your actual archives! While this might not be a problem, I feel that it’s important to have a path through which all pages on your site can be reached – no matter how deeply buried. If I have an orphan page, not linked to anything else, I still want to make it discoverable by a crawler without the use of a sitemap.

From an SEO perspective, I don’t know if this makes any difference. I may or may not, but I want to make sure that my blog always has a category archive page.

WordPress 6.0 Drops Just in Time

The timing couldn’t be more perfect. The previous versions of WordPress had a “Query Loop” block in the Gutenberg editor that was meant to show you a list of posts with “Next” and “Previous” links, just like a blog page. Unfortunately, there was no way to filter the posts by tag or category, making it useless for my purposes.

Thankfully, just a day before I wrote my earlier article on replacing the category page, WordPress 6.0 dropped with a revamped Query Loop block that gave me exactly what I need! So I don’t need to worry about creating new templates or pages. Here’s how to use the modified block to generate a category page.

Using the New “Query Loop” Block

First, make sure you’re using at least WordPress 6.0. At the time of this writing, it’s still a fresh release, so some of you might not have updated to the latest version yet. Now open a new post or page and insert the “Query Loop” block as shown here:

Query Loop Block on WordPress 6.0
Query Loop Block on WordPress 6.0

Once inserted, I choose “Start blank” as the option and select the “Title and Date” option for my new category archive. If you want, you can also choose other layouts such as:

  1. Title and excerpt
  2. Title, date, and excerpt
  3. Image, date, title

This will pre-populate your query loop with a list of posts. You can choose a list or a column layout. Personally, I prefer the columns. The next step is to choose the number of items per page. Select the Query Loop block (not the individual titles), and click the settings button on the toolbar – the one with the sliders:

Here’s what it looks like:

Choose the Number of Items Per Page
Choose the Number of Items Per Page

Choose a number that you would normally have on your category pages – for me, that’s 10. You can leave the other options untouched.

Convert the Titles into Links

Strangely, the Query Loop doesn’t generate links to your post titles. I don’t know how they made this decision, but I was very puzzled when I first saw it. Why would you have a list of posts without a link? Whatever the reason, the fix is simple. Select one of the titles – NOT the Query Loop block, and look at the “Link Settings” option on the right-hand side with a radio button that says “Make the title a link”. Enable this, and all the titles in the query block will immediately change to links.

Make the Title a Link
Make the Title a Link

Now save and publish your post, and you’re done! You can see that the “Next” and “Previous” buttons appear automatically like this:

Next and Previous Pages are Built In
Next and Previous Pages are Built-In

You can now use this URL at the bottom of the page that replaces your category tags so that spiders always have a way to access it. This way, you get the best of both worlds – a custom category page, as well as an archive that conveniently shows all your posts.

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!

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

Connect With Us!

Superhero Resources

Fix Common Issues

  • How To Setup Free And Automatic SSL Certificates
  • How To Setup Cloudflare With Railgun
  • How To Fix Memory Exhausted Errors In WordPress
  • How To Edit PHP Version/Upload Limit/Add Extensions
  • How To Move/Migrate Your Business To Name Hero

Free Guides

  • How To Setup NameHero Hosting
  • How To Create A Web Hosting Business With WordPress
  • How To Start A WordPress Blog
  • How To Migrate WordPress To A VPS
  • How To Speed Test And Optimize Your WordPress Website
  • Magento 2.X Installation Guide
  • How To Clean Up A WordPress Hack

Training

Recent Posts

  • The Best WordPress Plugin To Combat Plagiarism
  • Is It Time to Bring Back Blog Comments?
  • Two Filters That No Longer Work In Gutenberg (And Workarounds)
  • Migrating To The New Cloudflare Managed Rules Interface
  • How To Sort Posts By The “Last Modified” Date
  • How To Make WordPress Send E-mail From Another Address
Subscribe in a reader
  • Web Hosting
  • WordPress Hosting
  • Reseller Hosting
  • VPS Hosting
  • Twitter
  • Facebook
  • LinkedIn
  • YouTube
  • FTC Disclosure
  • Earnings Disclosure
  • Privacy Policy

Copyright © 2023 · Smart Passive Income Pro on Genesis Framework · WordPress · Log in