I was trying to figure this out all afternoon as well and figured out as well that the className is passed along by default in the save function for the root of
certain elements.
e.g. in the following code example where className is warning
return (
<div className="other-class-name" value={ props.attributes.content } />;
will return an element on the front end of
<div class="wp-block-block-name is-warning other-class-name">
https://developer.wordpress.org/block-editor/developers/block-api/block-registration/#supports-optional has some more information
Related Posts:
- How to use get_theme_mod in gutenberg editor wordpress?
- Custom gutenberg block image preview not working
- How to delete all records from or empty a custom database table?
- What is right way to go about adding functionality to a published WordPress plugin?
- Using Vagrant for customizable WordPress Multi-sites [closed]
- Creating button next to “add media” that allows you to choose a single post
- WooCommerce create new product and add to cart on form submit
- Extending WC_Cart in woocommerce
- WordPress Plugin as ‘Library’ From Abstract Application?
- Add custom meta box on Post page
- Custom Widget Creating PHP Exception When Placed In Its Own PHP File
- How to set value/term of a Woocommerce attribute text field in admin panel?
- Why is this custom taxonomy showing in the database?
- WordPress Plugin development Call to undefined function jQuery()
- Conditional Display of Links in Widgets
- How to add product images using script?
- Created Widget Not Showing up on Admin Panel
- Setting up widgets in wordpress with a unique ID for the after_title argument
- Gutenberg Block: Objects are not valid as a React child (found: [object HTMLDivElement])
- I need to add a custom “cover” to every new post — plugin or custom setup?
- How to find out what blocks are added by a plugin
- Use plugin or custom post type for game score functionality
- Recommendations for books/resource to get started with wordpress 3 development (plugins/themes) [closed]
- Check if User exists in WordPress Multisite
- Override the filter from plugin in child theme
- Custom plugins/Manipulated plugins: Always a terrible idea to inherit these types of WP sites that discourage updates? [closed]
- wordpress.org codebase
- Can a plugin deactivate and delete itself once installed and activated?
- Gutenberg: How to refresh ServerSideRender with useSelect and AsyncModeProvider true?
- How to modify shortcode attributes with data from current post
- How to import my YouTube channel into WordPress?
- My Category is too big on the Menu what can i do?
- How can I capture Memberpress user info after signup [closed]
- Plugin echos text from shortcode function in gutenberg page editor
- JS Support Ticket – Auto create WP account
- Removing customise fields during plugin uninstallation
- How to Create a Custom Panel and Fields in Post Page [Plugin]
- Translating long texts with html formatting
- Gutenberg block can’t save richtext
- custom payment gateway in woocommerce failed to connect to remote api server
- Send reply with pre-prepared answers
- Anspress Customization: How to show logged in user votes on a single answer?
- How create Group Blogs based on user created Groups
- Custom table naming/access convention for multisite: $table_prefix vs base_prefix or other?
- date/time-picker and file upload (image) fields for custom fields (e.g. with more fields)
- Getting Theme element into plugins page editor in wp admin
- Can’t get Gutenberg InspectorControls to work
- Inserting custom PHP script on homepage
- Best practice for including plugin output in a template without using shortcode?
- a weird attribute on every html tag
- How to change the wp_upload_dir() path in plugin
- Disable plugin only for one post
- Free paypal cart solution [closed]
- “uagb/section and uagb/columns block”
- WordPress Editor completely blank [closed]
- Advanced WordPress plugin activation detection
- how to change wp-admin url using function file
- Calling a save function from a “submit” button
- Is there a way to easily manage Project options (custom-fields)
- Renaming Custom Taxonomy Values
- Add a “default sorting” menu to child store pages
- Widget where it can make changes to the container
- Plugin code will not work properly inside a class [closed]
- Custom Module, Extending WP with a Plugin?
- Rename Smart YouTube’s httpv back to http for all posts
- WordPress FLIR (Facelift Image Replacement) plugin clipping off end of text
- Custom Post Type, Custom Columns List
- How to prevent plugin, theme installation failures on WordPress?
- WP REST API GET Method Works But Not The POST Method
- WordPress Gutenberg custom block
- Gutenberg: Prevent links from being clickable in the block. Error: “Cannot destructure property ‘frameElement’ of ‘r’ as it is null.”
- How to make PDF books readable on site with woo-commerce?
- Adding category base to url in custom post giving 404?
- Add custom WordPress admin page with pretty url via code
- Why does plugin_url append absolute file path?
- Block content rendering on the top just below body tag
- Looking for Image Slider that is based on default WP Media Library
- Custom Icon assigned to menu items not working for multi-site networks
- Woocommerce list variations that are added already to cart in Single Product
- Share on social media created listing after submission
- How can I save cookies to members
- Overwrite user role
- Place content inside the Post Loop
- Which One Is Better For Managing Add Ons For Extensible Plugin?
- Should I paste CDN links in a JS file or use a Bootstrap CDN plugin?
- Problem with Duplicate Meta / tag description in Webmaster Tool [duplicate]
- Restrict my pages from public
- Style WordPress Custom Post Type Single Page
- How to maintain WordPress permalink structure with custom content with URL parameters?
- Pull Data from DB for Admin Page Display as Relates to Admin Page Class by BA Internet
- Posts are deleted everyday at night
- show Visual form builder in the front end
- Is there a way to include some external script to some or all pages in a wordpress site?
- Making a particular kind of search engine with WordPress?
- AdBlock blocks my non-advertising sidebar images [closed]
- WordPress Customise
- Looking for membership style plugin with edit option [closed]
- Create plugin with multiple blocks
- WordPress Feature – Multi Level sorting
- How to get custom setting from get_option and pass it in getEntityRecords in gutenberg block?