Gutenberg element Button How do I customize the hover and focus effects?
Currently that is not an option inside the block editor. You need to add custom CSS to do it.
Currently that is not an option inside the block editor. You need to add custom CSS to do it.
this filter modifies the answer of the api route wp/v2/taxonomies when gutenberg request it. it relies on the http header Referer which is set by the client. then, there is no security checks, it’s only a cosmetic customisation. add_filter(“rest_prepare_taxonomy”, function ($response, $taxonomy, $request) { if (“bundles” === $taxonomy->name) { // searching the post id preg_match( … Read more
Assuming that your search block is inside the group block, you need to set the attribute via $processor->set_attribute( ‘data-wp-interactive’, ‘wpse/local-search’ ); inside your wpse_locals_filter_search function as well, since inner blocks are processed before the outer blocks (see line 11 below): function wpse_locals_filter_search( $block_content, $block ) { if ( isset( $block[‘attrs’][‘className’] ) && ‘wpse-local-filter’ === $block[‘attrs’][‘className’] … Read more
You could try to increase specificity with something like html:root html:root { @media (min-width: 1020px) { –wp–preset–font-size–xxl: 3.25rem; /* etc */ } } Or you could get your styles to load after the global styles as an option as you mentioned if you want to leave it as just :root
As of now, there is no dedicated user capability to read a reusable block; it is not possible to customize the capabilities (reading, editing, deleting) exclusively for reusable blocks. The capabilities are currently tied into in the capabilities of the post type ‘post’ so the capabilities that you give to the post type ‘post’ will … Read more
You’re getting that notice because your JavaScript code resulted in the following error: ReferenceError: Cannot access ‘EditComponent’ before initialization This means you need to register your block after the constants EditComponent and SaveComponent are defined. // Define the constants first. const EditComponent = …; const SaveComponent = …; // Then register your block. registerBlockType(‘eternaltwentyfifteen/prevnext’, { … Read more
Make sure the layout.css file is called correctly, both on the frontend and backend. No need to add fontFace, you have called it via @import : { “$schema”: “https://schemas.wp.org/trunk/theme.json”, “version”: 3, “settings”: { “layout”: { “contentSize”: “700px”, “wideSize”: “1200px” }, “typography”: { “fontFamilies”: [ { “fontFamily”: “\”PT Sans\”, sans-serif”, “name”: “PT Sans”, “slug”: “pt-sans” }, … Read more
I know I can do it by adding a CSS class under ‘Advanced’ but it’s not ideal for non-technical content editors. That sounds exactly like a block style, which is essentially the GUI version of this. You can assign a block style from the block inspectors style tab, the toolbar, or the inserter, and it … Read more
Block variation styles are parsed and processed through wp_render_block_style_variation_support_styles(). This is marked as private and thus should not be called by third-party code outside WordPress core. This function is called by virtue of being hooked into the render_block_data hook. Thus, if you have a subset of known block structures that may appear, you could consider … Read more
First: It is impossible allowedBlocks only accepts block names as strings — not specific variations or object definitions. Second: What’s the correct approach? Use the base block name, then define the variation via className or attributes in the template. How to find a variation’s className? Insert the block (e.g., core/group) and select the desired variation. … Read more