Our Radio Website Platform has a great selection of custom blocks. One of these – the Post Grid Block – allows you to feature content on your website using custom criteria. This article explains how to adjust this criteria.

The Post Grid Block looks like this:

When you use the ‘Post Grid’ block, you can specify a special option to define which posts end up in the resulting grid. This special syntax is in-built into WordPress and called ‘WP_Posts Query’.

By default, a blank WP_Query will simply select the most recent Posts on your website. However, we can manually add settings to define how posts are automatically selected.

Some example queries:

  • Display posts from a specific category:
  • Display posts from two categories:
  • Display posts from a tag:
  • Display pages:
  • Change the quantity:
  • Re-order the posts:

Of course, these options can be combined to form more advanced queries. Here are some further examples:

  • Display six most recent posts from the ‘station-news’ category:
  • Display three most recent posts from the ‘breakfast-show’ tag:
    tag=breakfast-show&posts_per_page=3& order=ASC&orderby=date
  • Display six random posts from the ‘recipes’ category:
    category_name= recipes&posts_per_page=6&order=RAND

You can even use WP_Query syntax to specific exact pages:

  • Display Pages with IDs 168, 292 and 613, and order them in that specific order
  • Display both Pages and Donation Pages with specific IDs

If you wish to display a post manually, without any automatic selection logic, you can use the ‘Card’ block. This block allows you to display a single post or page by manually selecting the title. You can combine this with the ‘Columns’ block to create custom grid layouts.

It is also worth noting that if you have multiple ‘Post Grid’ blocks on the same page, each post will only be displayed once – the system automatically de-duplicates posts so you don’t have to manually do this.