
Create Blocks filtered by any post type and any categories, tags or custom taxonomy terms.
Add Custom Dynamic Blocks for Render Post and Posts.
Displays a list of posts.
Posts Block filtered post type. (ex. post, page) and filter posts by multiple categories, tags or custom taxonomy terms.
Override template by your theme. if template-parts/blocks/advanced-posts-blocks/posts.php exists in your theme, replace default view.
Displays the selected page or single post.
Override template by your theme. if template-parts/blocks/advanced-posts-blocks/post.php exists in your theme, replace default view.
Displays the child posts on the selected page or post.
Override template by your theme. if template-parts/blocks/advanced-posts-blocks/children.php exists in your theme, replace default view.
Support template hierarchy. The templates are searched in the following order.
template-parts/blocks/advanced-posts-blocks/{Block_Type}/{Post_Type}-{Style}.phptemplate-parts/blocks/advanced-posts-blocks/{Block_Type}/{Post_Type}.phptemplate-parts/blocks/advanced-posts-blocks/{Block_Type}-{Style}.phptemplate-parts/blocks/advanced-posts-blocks/{Block_Type}.php
{Block_Type} is posts, post or children.
$class_name (string) Block style class names.$query (WP_Query) Query for block.attributes parameter to advanced_posts_blocks_posts_query filter.attributes parameter to advanced_posts_blocks_posts_query filter.advanced_posts_blocks_use_default_template filter.Use ComboboxControl for post selector.publicly_queryable: false )block.json.advanced_posts_blocks_default_template_path .$args in template.Register your block style.
register_block_style( 'advanced-posts-blocks/post', // or 'advanced-posts-blocks/posts', 'advanced-posts-blocks/children' array( 'name' => 'your-style', 'label' => 'Your Style', ) );
Create template template-parts/blocks/advanced-posts-blocks/post-your-style.php
if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); // write template tag! endwhile; wp_reset_postdata(); endif;