You certainly can do (not recommended). I just dig into the source there’s no filter/action hooks used in register_block_type()
and it’s related classes. The only way (WordPress 5.3) is to redefine the latest post block again within your theme or plugin. The best way will be creating your custom blocks.
// Remove the existing action
remove_action( 'init', 'register_block_core_latest_posts', 10 );
your_render_callback( $attributes ) {...}
function register_block_core_latest_posts_wpse353682() {
register_block_type(
'core/latest-posts',
'attributes' = [...], // copy attributes from the original function...
'render_callback' => 'your_render_callback',
);
}
// Re-attach the block
add_action( 'init', 'register_block_core_latest_posts_wpse353682' );
Related Posts:
- How to trigger JS in gutenberg page load
- Gutenberg: Block validation failed
- Change order/position of Gutenberg inspector control panel
- Gutenberg Inspector Controls
- serialize_blocks breaking html tags in content
- How to use getBlockIndex
- Hide or show Gutenberg custom block using date range
- Use page Title in Gutenberg custom banner block
- How to add code to `head` with WordPress 5.9 FSE (Full Site Editing)
- Block Editor: add an aria-label to an option inside a SelectControl
- Gutenberg: Get All Attributes From «core/image» Block
- How to make the Preview button automatically open new tab?
- Gutenberg: How can I disable backspace key from deleting an empty paragraph block?
- Gutenberg translation is not working
- How to add javascript function in the “save()” of gutenberg block?
- How to check if current admin page is Gutenberg editor? [duplicate]
- Possible add color palette for a block’s inner div instead of outer?
- Programmatically trigger the gutenberg save
- Gutenberg : in the backend, I just want to store a JSON object
- wordpress gutenberg url popover custom options
- Text Editors Are Hiding Text
- Disabling deleting reusable blocks except on the reusable block manager
- Gutenberg remove Most Used group
- Gutenberg. How To Register A Custom Block Style For Specific Post Type Only
- get used blocks in post and detect changing
- How to know whether you are editing a page or a post?
- Gutenberg get block name
- How has my WordPress editor become so basic? Cannot add blocks or see anything visual
- Block Validation Fails: ‘
- Insert SVG code (not img) in HTML block
- How to enable Block Editor on the Posts page
- React to a change of the block alignment
- Object type for block Attribute (Gutenberg)
- Controlling the RichText component outside of blocks
- Custom Gutenberg Block: How to return plain HTML with save(), without escaping?
- How to allow to add gradients to core/heading block?
- Gutenberg: How to update associated Terms of Custom Taxonomy to Current Post
- Gutenberg: How to float core table block in front-end of site?
- Guttenberg Implementation on Front Page
- Register multiple styles / scripts in register_block_type
- How to automatically remove noreferrer from targetd link rel attribute, on render?
- Should there be concern about breaking Gutenberg updates to extended core blocks?
- How do I access onMerge, onReplace, onRemove functions for a Rich Text component in Gutenberg block code?
- How can Reusable Blocks be fully deleted?
- Make a Gutenberg Block that do WP_User_Query
- Extend Gutenberg block core/quote block
- How to get all attributes of a block in PHP?
- reload the gutenberg editer on taxonomy change
- Gutenberg Block Get Author Details
- Gutenberg Block Toolbar – remove button
- WordPress block editor embeds not working in theme (single.php)
- Cannot enable Gutenberg editor [closed]
- Remove ‘type / to choose a block’ placeholder [duplicate]
- Start a line with – without converting to list
- Quickest way of developing custom Gutenberg Blocks
- gutenberg attributes
- How to register two blocks in the same plugin
- Gutenberg: always show text color selector in editing bar
- How to lock innerBlocks within a block variation?
- How to get startIndex and endIndex from the selected block in gutenberg?
- How to remove the old “Custom CSS” from customizer after the theme has been migrated to Gutenberg FSE
- Why am I getting the error: Cannot update a component (`Unknown`) while rendering a different component (`Edit`)?
- Update number of posts when attribute changed
- Gutenberg editor auto remove wrapping tags like
- Setting fontSize within core/heading
- Unable to edit server side rendered block
- Embedded block editor in block editor
- useSelect in block Edit always returns default store value
- Count Gutenberg blocks on the front-end?
- How to call a react hook on edit of registerBlockType?
- Why does the paragraph block automatically add class?
- How can I block embeds and show an individual preview image per block?
- add arrow icon next to read more link on latest posts gutenberg block
- How to make attributes unique to Gutenberg blocks
- How to check title is being entered in Title Case?
- Gutenberg link of internal page not showing
- How do I trigger the sidebar reveal for my sidebar plugin in the Gutenberg editor?
- Create Gutenburg Block to render inline SVG
- Gutenberg blocks not full width
- How to extend the URLPopover render settings for the paragraph Gutenberg block?
- Custom Image Gutenberg Block With Caption
- How to make a block similar to another block
- Gutenberg: How to enqueue scripts conditionally in render_callback by checking for an attribute?
- How can I reintroduce autocompletion of Gutenberg components in Visual Code?
- Blocks – any way to have editor honor width percentages on child blocks?
- How to edit post meta by post ID in Gutenberg
- How do I change bullet on categories block?
- Add a class to img of core/cover block
- Hide title block on edit screen in Gutenberg
- Categories, tags and thumbnails panels are not visible in the Block editor’s post menu
- How to translate multiple blocks within one plugin
- How to disable the Code Editor in Gutenberg?
- Enable Gutenberg Editor when editing tags
- How to position more than one item over an image in a Gutenberg WordPress block theme
- Some CSS classes missing when rendering the page with get_the_content()
- Error with RichText Component
- Rem font size is different in the frontend and block editor
- Add to Media Inserter Categories
- Get attributes from last block created
- How do I make the block editor use https by default?