Custom Query Blocks

A small collection of blocks to assist with common queries with regards to custom post types and terms.

Choose between displaying a grid of posts, a grid of terms, or featured posts by category.

Core Features

Archive Mapping, Term Mapping, and 404 Page Mapping

Custom Query Blocks started as an archive mapping plugin. The blocks are popular but supplemental.

Archive Mapping

Have a post type archive? Map your archive to a page and customize what’s on your archive page using Gutenberg.

Term Mapping

Map a term archive to a page and customize the display of a term archive page.

404 Page Mapping

Map a 404 to a page and fully customize your 404 page.

Companion Blocks

The plugin currently contains 3 companion blocks to assist in showing content on your archive pages.


Frequently Asked Questions

Please report the issue in a comment below or visit us on GitHub and file an issue.

Make sure your post type has has_archive set to true and show_in_rest set to true.

Only pages can be mapped to an archive, term archive, or 404 page.

Yes. Edit a term and you can map it to any page.

Please leave support requests on the support forums.

If you have Adobe fonts, you can add more fonts by using plugin Adobe Fonts.


Join us On GitHub


Add Fonts

The plugin comes with several default fonts. It also supports the Adobe Fonts plugin without any extra programming.

Here’s an example of adding more fonts, such as a Google Font.

add_filter( 'ptam_fonts', function( $fonts ) {
    $fonts['open sans'] = 'Open Sans';
    return $fonts;
} );Code language: PHP (php)

Remove Page Column

add_filter( 'ptam_add_pages_column', '__return_false' );Code language: PHP (php)

Disable Image Sizes

The plugin creates two image sizes. Here’s how to disable them programmatically.

add_filter( 'ptam_add_image_sizes', '__return_false' );Code language: PHP (php)

Customize Custom Field Output

The Custom Post Types block supports custom fields, but maybe you need to customize the output?

 * Filter the custom field value.
 * Filter the custom field value.
 * @since 3.0.0
 * @param mixed  $custom_field_value The custom field value.
 * @param string $maybe_custom_field The custom field name.
 * @param int    $post_id            The Post ID.
$custom_field_value = apply_filters( 'ptam_custom_field', $custom_field_value, $maybe_custom_field );
Code language: PHP (php)
add_filter( 'ptam_custom_field', function( $value, $custom_field_name, $post_id ) {
    if ( 'my_field' === $custom_field_name ) {
        return 'new value';
    return $value;
},10, 3);Code language: PHP (php)

Ronald Huereca
MediaRon - Ronald Huereca

Ronald created MediaRon in 2011 and has more than fifteen years of releasing free and paid WordPress plugins.

Quick Links

Say Hi