Display only selected posts categories on a page

Note: This post is about my efforts to learn and understand how the WordPress Categories Query block works in the Classic vs block themes. It’s still a work in progress, so I’ll be updating it regularly.

Recently, one of my close friends, who volunteers for a non-profit organization, reached out for assistance with a small issue. He asked me to create a page on their WordPress site that would display posts from specific categories. The desired layout was straightforward: a brief introductory statement followed by a list of posts from selected categories.

The website

The website runs on WordPress and uses the upsale Classic theme, which is tailored to manage membership and related plugins. It’s powered by a variety of plugins to handle different functions, such as design creation, form building, event management, membership handling, payment gateways, and other critical tools to keep the organization running smoothly.

The main goal was to display posts from chosen categories, such as “Our Story” and “Events,” on a dedicated page of of the site. This page would also be added to the top navigation menu. The page layout would consist of a title, a short description, and a list of posts, filtered by a custom query function that pulls content from the selected categories.

In this post, I’ll walk through how I achieved this setup on demo sites, using both Classic themes and newer Block themes.

Understanding Block Binding API

Note: This post of understanding newly added WordPress Site Editor features including using blocks. This learning post is still in active development and updated regularly. The Block Bindings API, first introduced in WordPress 6.5 and refined in 6.6, enables dynamic data binding to block attributes, benefiting custom blocks and features like pattern overrides. Initially, this […]

Exploring Synced Pattern Overrides Feature in WordPress 6.6

Note: This post of understanding newly added WordPress Site Editor features including using blocks. This learning post is still in active development and updated regularly. WordPress 6.6 introduces a powerful new feature called Synced Pattern Override, which has been in development since previous release cycles. As a reminder, block patterns are pre-designed groups of blocks […]

Exploring Gutenberg Grid Blocks

Note: This post of understanding newly added WordPress Site Editor features including using blocks. This learning post is still in active development and updated regularly. Grid layout support in the column blocks was initially introduced in the block editor with Gutenberg 15.5 and was officially integrated into WordPress 6.3. The new experimental grid features allowed […]