How to create a category query loop in WordPress

Summary

Yes, this is still about a page about improving your skills on inline skates. So hang on to me if you are looking for this! But I’m creating this side-page where you can follow me improving my website. Because I’m aware that my page has a few problems:

  • I’m not happy about the quantity of content: filming myself isn’t my greatest hobby and takes lots of time.
  • The layout of the different pages are not cohesive. Different fonts, no logo, different of no header and footer
  • The SEO lacks BIG time, so I’m nowhere to be found on Google

Bit of a struggle: I’m no developer in any way. But like willing to prove that it is still possible learning how to inline skate at “my age”. I’m also going (not willing) prove that I can make a awesome page!

Problem: posts about WordPress also showing on frontpage

And that is a problem, because my frontpage is about inline skating. And I don’t want to get anyone confused. So the posts about WordPress have to be on another page. For this you have to follow a few steps:

  1. Create a categorie
  2. Design a page for your category
  3. Write your post

In the next few paragraphs you will find a step by step plan for this.

Step 1: creating a categorie

First of all, the easy part!

  • On the dashboard for editing your website, click on ‘posts’ in your sidebar.
  • Click on ‘categories’
This image shows the dashboard. To add a categorie, click on 'posts' and choose for 'categories'
  • On the categorie page fill in a name for your categorie
  • In the field by ‘slug’ fill in a URL-friendly name. This is usually the same name as the name you have chosen for you category. If the category has more words, you must use a hyphen (‘-‘).

Step 2: Design a page for your category

The template is the layout of your website. With chosing the right blocks you can create the look, feel and possibilities for you page. If you want to show your posts for one categorie you have to create a query with a group that contains the following information:

  • Title: this is the title you have used for your post
  • Featured image: not neccesary, but I think it’s nice to have pictures in a query)
  • Excerpt: this is a short piece of the intro of your text you have written in your post

To make it easy for you, here an image to create this query loop yourself;

Query loop with post template

After this you have to assign this query loop to the category you want. This was a tricky one for me, therefory I hope I can help you out!

First click in the left side bar on “query loop”. After this go to the setting side bar on the right within the “block” part. Scroll down and when you’re almost at the end there you will find “filters”. In this text block you can type in your category or categories you want to be shown on this page.

Step 3 Write your post

The post is the piece of text that will be shown on your page. Here you can write what you want to share with your audience.

On the dashboard in WordPress click on Posts en choose for “Add New Post”. In the right sidebar (“settings”) you can appoint the right category to your post. And finally that is it!


Posted

in

by

Let’s Connect!
Share Your Thoughts

Want to share something, have a question, or just say hi? Drop me a DM on Instagram—I’d be happy to hear from you!

©2024 Skate40