Your cart is currently empty!
To create a custom blog page on any page of your website, you can utilize the “query_args” custom field.
Important Note: It’s important to note that this page should not be designated as the Posts page in Appearance > Customize > Homepage Settings.
To begin, navigate to Pages > Add New and create a new page that will serve as the designated area for displaying your posts. Keep this page empty, as it will automatically populate with your latest posts.
Once you’ve created the new page, enable custom fields for it.
In this article:
If you’re new to using custom fields or query_args, keep in mind that you may need to click “Enter new” (as depicted below) to begin the process.
To showcase all categories, add the “category” parameter to the value field, following the steps outlined below.
To display certain categories, include the category ID parameter in the value field, following the steps outlined below.
If you want to exclude a particular category, you can add a minus symbol (dash) in front of the category ID parameter in the value field, following the steps outlined below.
By default, the number of posts shown per page is set in Settings > Reading > Blog pages show at most.
But, you can display a different number of posts on this particular page by inserting the “showposts” parameter in the value field. In case you add multiple parameters, remember to separate them using the ampersand symbol (&).
In the following example, only one post from category 1 will be showcased on the page.
There are three methods to locate the category ID.
1. To uncover the category ID, navigate to Posts > Categories, and hover over the category name until the URL appears at the bottom of the screen. In the following example image, we hovered over a category called “Category #1”, which revealed the category ID at the bottom of the screen. In this specific scenario, the category ID is 2.
2. Another way to obtain the category ID is by clicking on the category name while on the Posts > Categories page. Next, you can locate the category ID in your browser’s address bar, as demonstrated in the image below. In this instance, the category ID is 2.
3. You can also use a third-party plugin, such as Reveal IDs, to view the category IDs. After installing and activating the plugin, navigate to Posts > Categories, where you can view the IDs listed in the table next to each category.