How to add a blog or news page to any WordPress website


While there are many ways to add a blog or news page to a classic or block theme, this short tutorial will introduce you to the most straight-forward way that can be used on either a classic or block theme.

Learning outcomes

  1. Add a blog or news page to any WordPress website using a block or classic theme.

Comprehension questions

  1. What block should you use to create a list of blog or news posts?
  2. What type of plugin can you use to better visualize your posts?
  3. Which setting do you need to turn off before your query loop will appear on your posts or news page?

Transcript

Welcome to “How to add a blog or news page to any WordPress website”. Did you know that adding a blog or news page to your WordPress website comes with many advantages? It strengthens your brand, draws visitors to your website, and is great for search engine optimizatio– if you consistently write new posts. Whether you are using a block theme or a classic theme, you can add a blog or news page to your website with the same technique. Let’s learn. While there are multiple ways to accomplish this task, let’s learn the most basic one by creating a Posts Page and adding a Query Loop block to it. The most straightforward way to create a blog or news page that works in both classic and block themes is to first head to your WordPress dashboard. Then select “Pages” and “Add New”. Title this page something like “Blog”, or use a title like “News” if you only want to write shorter updates. From here you will use your inserter to search for a Query Loop block. The Query Loop block is used to display blog posts or other post types. When you select this block, two options will appear: “Choose” and “Start Blank”. While you can choose to start blank, it may be easier to choose a pattern which you can modify from there.

A note: if you don’t have any blog posts written to start, it may be hard to see what your options are. Consider using a plugin to generate demo content that you can easily remove later, or by adding a few temporary blog posts to your website under the Post section. This will allow you to see what your blog post page will look like. For example, here I am using the FakerPress plugin to generate fake blog posts, which will allow me to better pick and adapt the pattern I’d like in this Query Loop block. I decide to add 10 new posts from the last 15 days and select a few more settings. I decide to use some images from Lorem Picsum and then click “Generate”. Now I can see all the temporary demo data in my post section. Then I head back to my News page and add a Query Loop. Click the Edit button. Then, I add a Query Loop. Let’s see how this is different. Now if I choose a pattern, I will be able to see the demo data and some placeholders, which makes it a lot easier to visualize what I’m doing with this Query Loop. When you select “Choose”, you have many options to choose from. So select whichever pattern resonates with you the most. From here you can add or adjust a variety of theme blocks such as how your post featured images will appear, whether or not to include a date, title, author, or excerpt and more. There’s a lot you can do with the Query Loop block. To learn more advanced features about it, please see the tutorial “Taking advantage of Query Loops”. Once your blog posts look the way that you’d like, it’s almost ready. However, before you save this page, there is one more setting you need to select. Using your List View, select the Query Loop. Then access your settings on the right, and disable the setting “Inherit Query From Template”, and then Save. This will allow your query loop to function entirely independently on both classic and block themes. Now my theme automatically added this news page to my menu, though you may need to add it to your own menu depending on your theme settings. Now, any future post I write will appear on this post page.

Watch as I publish this new post here—it is published on my website. There it is on my News page. Don’t forget to remove the dummy data, which I will do using FakerPress by going to the FakerPress dashboard and writing “Let it go!” Now if I head to my posts list, you’ll see it’s just the posts that I wrote–none of the fake data. Fake data was also removed from my News page. There’s a lot to know about blogging. To learn more about publishing and blog posts, please visit wordpress.org Select the Learn drop down. Then select documentation. And finally, press the Publishing button. There’s a lot to know about blogging. For more tutorials, live online workshops and courses, please visit learn.wordpress.org. See you next time.

Workshop Details


Presenters

Sarah Snow
@arasae

WordPress educator and/or mad scientist; my professional hobbies include breaking WordPress websites in front of audiences, investigating simple solutions to odd problems collaboratively, and designing lesson plans and courses for learn.wordpress.org. Ask me about caring for parrots, training stubborn Shar Peis, cooking super spicy recipes, learning American Sign Language & French, teaching and writing. Changing the narrative one story at a time.