Extending the Query Loop block

If you want to exclude output filters (which would be the normal way to do this) you are asking for a query that retrieves 9 posts and 3 ads (a separate post type or taxonomy?) in a specific order. The query block has limited querying abilities, but those can be extended to the full possibilities … Read more

FSE Change Post Template to Something Other Than a List

The ul/li tags are hard-coded into the render_block_core_post_template() functíon: $content=””; while ( $query->have_posts() ) { $query->the_post(); $block_content = ( new WP_Block( $block->parsed_block, array( ‘postType’ => get_post_type(), ‘postId’ => get_the_ID(), ) ) )->render( array( ‘dynamic’ => false ) ); $content .= “<li>{$block_content}</li>”; } wp_reset_postdata(); return sprintf( ‘<ul %1$s>%2$s</ul>’, $wrapper_attributes, $content ); See here: https://github.com/WordPress/wordpress-develop/blob/bed9d00fbdac9da08ed13e84186c53a686a1ea78/src/wp-includes/blocks/post-template.php#L69 There would … Read more

tech