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:
There would be a hacky way to modify the output via the render_block filter, but it might be better to work through the problem via CSS instead.
Related Posts:
- Correct way to make a custom block theme responsive
- Full site editing templates folder vs block-templates
- Block to show posts from same category
- Full Site Editing, Block Theme, Gutenberg, Site Editor
- Proper, exhaustive documentation for wp.editor etc
- Edit srcset and sizes attributes in Gutenberg image, cover and gallery – blocks
- Add colors to existing color palette without replacing it
- Can you filter posts by meta key with the getEntitityRecords selector?
- WP Gutenberg custom block – generate theme colors from SASS and use them in the inspector and php callback
- create blocks programmtically on theme activation
- Can I customize any WordPress parent block-based theme template files by child theme like a parent classic theme?
- How to support Lazy Loading Assets in a WordPress Theme?
- WordPress Gutenberg Theme: Structure, Hierarchy and Custom Templates
- Gutenberg Reusable Block as part of WordPress Theme page
- Custom button block doesn’t work
- How to float an image in Gutenberg
- Gutenberg – editor-font-sizes in functions not working
- Can’t select my block by clicking on it
- Which file handles the block latest posts, I want to examine excerpt handling
- create-guten-block in wordpress theme?
- What VSCode extensions are there for working with block themes? [closed]
- What is the “correct” way to add hooks or similar PHP behavior to a blocktheme?
- Not able to select width of blocks inside of cover block
- How to check if a WordPress core block is active in sidebar
- gutenberg add classes to list items
- How do you replace content generated by custom fields with custom blocks in Block Editor?
- Custom Blocks as part of a theme
- How to wrap all titles generated by Gutenberg “Heading” block with tag
- How to add InnerBlock multiple times in the same block
- Moving post title down the page / Removing a block from a post
- HTML block gutenberg templates
- Gutenberg theme development: how to add “headers” option under styles > colors > elements?
- Change default rel attributes for Image Block & Button Block
- How to update mark-up of a gallery block in a custom theme?
- Auto focus RichText field
- How to create nested array attribute
- Show popover with url and option to open in new window
- How to Modify WP_Includes/blocks/latest_posts.php
- How to render block editor in wp-admin custom pages programmatically
- Social-Link block not loading html on page with custom theme
- How to diagnose wp-env environment problem
- Attribute form NumberControl doesn’t update when I update page before it lose its focus
- WP Gutenberg custom block – generate theme colors from SASS and use them in the inspector and php callback
- Posts Page shows Classic Editor interface not Gutenberg
- How can I include custom Gutenberg Blocks in a theme?
- Block validation failed for `core/pullquote` after adding theme support for editor-color-palette
- Is there a way to add classes to a page when using a Gutenberg reusable block as page layout?
- Multiple content areas with Gutenberg – Transparent areas mid content
- Insert gutenberg blocks into template
- Template for posts of category in block theme?
- Can’t select my block by clicking on it on apiVersion – but using blockProps
- How can I use pre declared blocks in a php file?
- Is there any filter or action hook to remove layout classes from appearing in my templates?
- How to set the margin on an innerBlock in a block variation?
- Align images to the left of the content
- Image and font support missing in editor when deploying theme remotely
- Why is my Toggle field not showing in Gutenberg?
- When trying to run build script with gutenberg (with SVG import) – Error: Plugin name should be specified
- Adding copyright notice to page bottom in full site editing template
- Unwanted spacing for cover block
- Activate Gutenberg group block for theme
- How can a theme define which settings for blocks are available in the block editor?
- How to add multiple custom blocks in custom WordPress theme using create-block?
- How to create a template for a post in Query Loop block?
- WordPress 6.4.2 – can’t load editor style css using ‘after_setup_theme’ or ‘admin_init’ actions
- How to add group-row to InnerBlock template?
- Disable interactivity for core navigation
- How do I access the current post object within a block theme template or pattern?
- Get the name of the template/*html file used
- Get the name of the template/*html file used
- How to effectively reset the post object after calling get_posts()
- How wp_cache is supposed to work, and does it help with performance?
- is_home() returns false on the home page! When is the home page NOT the home page?
- Custom attribute for the title tag with wp_title()
- What, specifically, should be included in theme_name_setup()?
- Symlink a directory to wp-content/themes
- Passing variable in hooks and filter
- Formatting ?
- How do I create a specific login page for a specific user?
- How do you protect a premium theme from being copied?
- Convert PHP readfile to WP_Filesystem
- Do I need normalize.css when developing my own WordPress-theme?
- Bootstrap card columns change images size
- Will my site get messed up when the wordpress theme updates if I edited the html code in the editor to change footer?
- Have the homepage look different to index.php without a static page
- Invalid hook call on save, not edit when using swiper slider
- How to style bootstrap container in wordpress theme?
- Wamp Server error on running wordpress theme on localhost. How do I fix this error? [closed]
- $_POSTing to and modifying the WP search results page
- Confused by the behaviour of “front page” / “home” templates
- How to Grab first Image from some Chosen Categories
- get_avatar() is not working in my custom theme
- When I save changes for css and js in my WP localhost env windows 10 the changes don’t take effects immediately!
- makeing a terms of use page that is part of the theme
- Child theme in separate WordPress Install
- Display problems in admin dashboard when creating a new theme from scratch
- WordPress 3.5 + Foundation 5 not working on IE9
- Want to include ad code after related post
- Pagination adds product to cart Woo-Commerce
- Onepage with shortcodes