WordPress is an excellent tool. Simply brilliant. There is a feature in WordPress that allows you to query posts based on criteria that you set. For example, you can label posts with a specific category and with that information create a page that lists or displays simply those specific posts.
There are WordPress themes, such as the Rezo theme from Themify that this web site is built from, that allow you to tap into this powerful feature of WordPress. As I gradually build my new web site I am using this feature of WordPress to populate specific pages with information generated by blog posts. Let me share the process.
First of all I decide upon a suitable category for the specific posts that I wish to publish on a particular page of my site. I might decide to categorise all my posts concerned with photography with the tag “Gallery”. I will now use the category “Gallery” for any blog post that features photography.
I added a new page to my site entitled “Gallery”. I could have called it “Photographs” or “Snapshots”. The fact it is also called Gallery has no bearing on how this feature functions.
Each new page has a feature that allows me to query or identify blog posts based on specific category titles. For my new “Gallery” page I ensure that it will only display posts that have been labelled with the category “Gallery”. I select the category “Gallery” from the drop down menu. I can then publish the page. I can also enter specific category ID numbers if the page is designed to display posts from 2 or more categories. I then decide upon a layout. Beautiful.
WordPress will then populate that page with any posts labelled “Gallery” in this instance. The appearance of the page can be altered using the page layout options for that page. No coding required. As you can see in the screenshot below the Page editing field is devoid of any text or code.
Despite the fact that there is not a single line of code a Gallery page is created that looks elegant. No hard work involved.
I utilised a similar process with my Friday Follow page. The screen shots below illustrate the process.
Establish a category
Ensure new Friday Follow page checks for any post labelled “Friday-Follow”
The published page displays only those posts.
You can also use this technique to write blog posts that do not appear in your regular blog feed but are published elsewhere on your WordPress site. For example, only posts that include the category “News” will appear in my blog feed. Therefore I could publish posts without that that News category elsewhere on my site by using a specific category for a specific page. This is a powerful use of WordPress.
The technically minded can explore more here about the query posts function in the WordPress codex. I did not consult this. I simply made use of the feature in the theme that I am using for this site. You can explore more of the power of WordPress via this workshop.
Recent Comments