Contributors: Toro_Unit Donate link: https://www.paypal.me/torounit Tags: posts, blocks Requires at least: 6.1 Tested up to: 6.3 Requires PHP: 7.4 Stable tag: 5.2.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html
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}.php
template-parts/blocks/advanced-posts-blocks/{Block_Type}/{Post_Type}.php
template-parts/blocks/advanced-posts-blocks/{Block_Type}-{Style}.php
template-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.
- Blocks
- Multiple Posts Block
- Child Posts Block
- Single Post Block
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;
- Use block.json api version 3.
- fix
attributes
parameter toadvanced_posts_blocks_posts_query
filter.
- Tested on WP 6.2 and PHP 8.2.
- add
attributes
parameter toadvanced_posts_blocks_posts_query
filter.
- Change icons.
- Refactor code.
- Tested WP 6.0.
- Use SSR only for Preview.
- Support query for ignore terms.
- add
advanced_posts_blocks_use_default_template
filter.
- Child Posts Block: Bug fix for post type selector.
- Single Post Block: Changed to fetch the post after the keyword is entered.
- Optimize code.
- Multiple posts block: Support menu_order attributes.
- Child posts block, Multiple posts block: Re-order query controls.
- Refactoring components.
- Refactoring release.
- Drop WordPress 5.5 and PHP 7.2
- Single post block:
Use ComboboxControl
for post selector.
- Taxonomy panel bug fix.
- Support internal taxonomies. (
publicly_queryable: false
) - WordPress 5.6-beta-4 tested.
- Multiple posts block: fix react hooks violation.
- Multiple posts block: block bug fix.
- add
block.json
.
- Update build task.
- Add filter
advanced_posts_blocks_default_template_path
. - support
$args
in template. - Tested WordPress 5.5.
- bug fix for single post block.
- Allow select hidden post type.
- Posts Block: Support ignore sticky posts.
- Separate block script.
- Refactoring.
- use react hooks.
- Term attribute bug fix.
- Term control key fix.
- attribute bug fix.
- [Multiple Posts Block] Support offset attribute.
- Fixed typo.
- Remove wpautop in template.
- Default template bug fix.
- Bug fix.
- first release.