You don’t, if you need a dynamic value you have to have a server rendered block.
Otherwise, if you managed to get the theme mod, it would be frozen to the value it had at save, and changing the value in the customiser would not update the blocks. So use a dynamic server rendered block and grab the value in PHP the same way you normally would.
Related Posts:
- Which functions in theme or plugin load first
- How to load a new template page according to a particular URL?
- Redirect to another page using contact form 7? [closed]
- Rename a folder via HTML POST request
- Why the output of an image gallery plugin is not displayed into a page of my custom theme?
- How to generate a responsive output from plugin?
- How to add image for custom taxonomy
- Best approach to change mobile background image and adding its class
- How to structure a plugin
- is_plugin_active function doesn’t exist
- Custom pages with plugin
- WordPress Plugin Development In MVC Architecture, How?
- What is the correct way for a theme to support plugin UIs?
- Create page when plugin is activated
- How to call “page specific menu items” in template [closed]
- Update Multiple Post Meta for the Same Post In One call?
- Integrating plugins in themes
- How to show custom message once on plugin activation?
- WordPress network: set themes and plugins for new blog
- Should I use RIPS tool to test my themes and plugins?
- Failed to invoke other hook from the init hook
- Can a plugin add to header/footer/body content?
- How do I future proof my older WordPress theme?
- Display future posts?
- Having separate plugins and themes folder for multi-site setup
- Passing RichText attributes to function onChange
- gallery option is not available in media upload box in costum theme option page
- WooCommerce get_price returning wrong price when used via ajax
- Open Post Thumbnail in New Child Theme File in WordPress
- JS Support Ticket – Auto create WP account
- WordPress Gutenberg react make import of __experimentalUseInnerBlocksProps which is no more experimetal
- Disable woocommerce cookies and delete cart data automatically
- How to fetch products with the price in a page on woocommerce using a form or live search with php
- Best way to maintain and update 3rd-party WP plugin when developer is unresponsive?
- Best place for short bio,image and button [closed]
- What are the specifics of WordPress development I need to know? [closed]
- How to create a code editor for my plugin .?
- wp_footer hook only working on homepage not in other pages
- Great blogs site resources/tutorial for WordPress Developers? [closed]
- Custom post types – remove default post supports through empty array?
- Plugin function inside custom plugin
- Add filter on html tags,attributes on specific function in wordpress
- Release the plugin in the WordPress repository where redux is used
- How to use the CSS of the WordPress core in the development of my administration page?
- Set Multiple Meta Values as an Array Using dispatch( ‘core/editor’ ).editPost() Call in Gutenberg/JS
- Minimize and Uglify WordPress Plugin Files
- Comment “like” problem – “users who like this” avatar linking to current user profile instead of “liker’s” profile
- WordPress API functions not working at AJAX functions.php call
- What’s the right way to implement functions in footer.php
- How do you create a re-useable HTML fragment in wordpress
- Delete data from custom table when deleting a post
- Use a custom block in another block
- Xamp installed local wordpress not allowing to publish or install plugin
- Set Button in PluginDocumentSettingPanel Content (WordPress Gutenberg)
- How to keep plugin (media-sync) running even the tab is closed?
- Widgets are not displaying in the admin panel
- submit two file input fields in the same form
- Content-Security-Policy implementation with WordPress W3Total Cache plugin installed
- Has blocks gutenberg block multiples registers type in my Plugin
- Fixed: Console.log twice in the edit function
- How to access a wordpress plugin page or add posts without doing it from the WordPress dashboard?
- How to resolve warning for `unstableOnSplit` prop on a DOM element in block editor
- woocommerce: Customize email with item total count
- Custom Plugin: How to Include Install Buttons of other 3rd Party Plugins?
- Child theme modifications not showing up
- how to change a static testimonials into dynamic
- My wordpress local urls is still displayed even moved to live
- How can I see $post object in frontend from functions.php?
- Move plugin pages from dashboard to front-end
- working code, not working – Plugin Dev
- Cannot view Custom Post Type no matter what I try
- when i activate my WordPress plugin cannot see customizer options or preview
- Installation failed, trying to install ANY plugin
- How to use custom footer template in a site-plugin?
- Help Code Review – I need to write on .htaccess file from theme’s function.php
- Where do the section input fields values are stored in database
- Confusing problem with displaying message recipient metadata
- Display Powerpress media url
- Update Plugin Without Overwriting Custom Settings
- Directory structure for plugin changes
- Can anyone tell me why I can’t edit a plugin when it is installed without having to re-install?
- What is the Object for WP_Error Class?
- Active Plugins for current blog in WP Multisite Network? [duplicate]
- Breadcrumb is not generating the correct post page url
- Gutenberg: Dynamic Block – Show saved data in the editor
- Integrating WordPress Content into a jQuery Slider
- Custom gutenberg block image preview not working
- Take Elementor For Email FIeld Check if user is registered. IF not registered then register on woocommerece
- How do I set register_meta for a specific CPT?
- How to Enfroce Domain Licensing Limits? [closed]
- How do I save meta key value in the save function?
- Update Content for a Custom Block Toolbar Button
- Wrong block appender button showing
- How to get custom setting from get_option and pass it in getEntityRecords in gutenberg block?
- How to make a Template page to show the information of different things Shop and Product page?
- How can we extent core/group or cover block?
- Need to add custom cart item data
- How do I apply different block supports to different parts of my custom block?
- Remove and strip html tag values
- Custom Gutenberg blocks not showing in WP editor