ACF Inside Interactivity block
ACF Inside Interactivity block
ACF Inside Interactivity block
Query Loop block display multiple post types
The columns appear vertically because when printing, the viewport is considered quite narrow. For the column blocks to appear horizontally next to each other, they have this in the CSS for the core/columns block: @media (min-width:782px) { .wp-block-columns { flex-wrap:nowrap!important } } This media query does not pass when printing, thus the columns appear vertically. … Read more
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
This can be achieved by adding two “group” blocks inside of the “Footer” block. You can then edit the “styles” of each group block to give them distinct background colors. Finally, to remove the space between the two groups, you need to change the Margin top of the lower group block to None. You may … Read more
You don’t want to use getCurrentPostId() from the core/editor store. This gets the current post ID from the post being edited, not the post in the query loop. To get that, ensure your block accepts postId (and possibly postType) as block context values via the usesContext key in the block type metadata. This can be … Read more
If you have a “hidden” CSS class in your theme that hide blocks (like .hidden {display: none}, you can add this class to your block in the editor using the “Advanced > Additional CSS class” control
It is not possible to pass query parameters (data) to the component <InnerBlocks />. However, there is a work around. You can fetch and store data in a parent block and then create separate “child” blocks according to the attributes (data) you want to pass (title, featured image, etc.) import { registerBlockType } from ‘@wordpress/blocks’; … Read more
First I was about to suggest you’d try replacing the render_callback of the core/navigation block. The custom rendering callback would have returned a class extending the WP_Navigation_Block_Renderer class. E.g. add_filter( ‘block_type_metadata_settings’, ‘wpse_426956_replace_core_nav_block_renderer’, 10, 2 ); function wpse_426956_replace_core_nav_block_renderer( array $settings, array $metadata ): array { if ( ‘core/navigation’ === $metadata[‘name’] ) { $settings[‘render_callback’] = ‘wpse_426956_my_core_nav_block_renderer’; } … Read more
Uncaught Error: The entity being edited (postType, undefined) does not have a loaded config