How to Display Posts on a Category Page, Divided Into Their Respective Subcategories
Say you have a category page on which you’re asked to display all the posts that belong to that category’s subcategories. So far no sweat – a category page displays by default all its descendant posts, whether they belong directly to that category or any of its subcategories. But here’s the twist: say you have to display them in such a way that the subcategory names are displayed (challenge no. 1), and under each subcategory’s name you have to display all its posts (challenge no. 2).
Creating a WordPress Widget to Show a Random Post
Making a widget to show a random post uses two underlying concepts you need to get familiar with to be good at WordPress development: making use of WP_Query objects, and making widgets. If you’ve not checked them before, check out our Quick Guides which more thoroughly introduce both:
How to Change a Post’s Author in WordPress
There are lots of situations where you might want to change a WordPress post’s author. Fortunately, changing the author of a post (of any post type—Post, Page, or any custom post type) is easy to do if you know where to look.
How to Disable Comments on All WordPress Posts
So you want to disable comments on all posts on your WordPress site. No problem, and you don’t have to click dozens of checkboxes to do it. This text and video Quick Guide explains how to use the Disable Comments plugin to permanently turn off comments across your WordPress site.
Using Gutenberg to Show Your Site’s Latest Posts on a Page
How do you show latest posts with Gutenberg? That’s what we’re here to answer. When I wanted this feature, it was so that my site’s “About” page would be able to list my latest posts. Back in 2007 or so, I more-or-less had to learn to program to get this working in WordPress. Now it’s as simple as finding the right block in the WordPress Gutenberg editor.
How to Find WordPress Post ID (no code!)
It’s not uncommon for a WordPress plugin (especially one developed for a small team of users) to rely on WordPress post IDs. If you’ve been around WordPress a lot, finding these numeric identifiers for the piece of content you’re wanting to control via WordPress post ID is easy. If not, this Quick Guide is for you. We’ll cover two different ways that when given a page on a WordPress site you control. First I’ll cover how to find the WordPress post ID with the web page’s HTML, then we’ll locate the numeric ID of the post by editing that post.
Simple WP_Query Example: Using a Shortcode to Display Post Titles
In this video and text Quick Guide, we present a basic use of WP_Query inside a WordPress shortcode, to show the post titles of the five most recently published posts. We’ve designed this Quick Guide to be a simple intro to using WP_Query in general, as well as to using WP_Query to display post titles and other post data inside a shortcode specifically.
Changing How Your WordPress Post Titles Appear: A First Filter Hook Tutorial
This Quick Guide covers how to use code to change your WordPress post titles. This is separate from manually changing one or more WordPress post titles, which you can do without code. Instead, it’s the kind of thing you’d want to use to change something about a lot of post titles at once, like adding “(Sale!)” in front of all 200 products in a product category.