register_post_meta has a post type parameter, or just set object_subtype to the post type.
register_meta(
'post',
'_duib_cl_heading',
[
'auth_callback' => '__return_true',
'default' => __( '', '_duib_cl_heading' ),
'show_in_rest' => true,
'single' => true,
'type' => 'string',
'object_subtype' => 'testimonial',
]
);
Or
register_post_meta(
'testimonial',
'_duib_cl_heading',
[
'auth_callback' => '__return_true',
'default' => __( '', '_duib_cl_heading' ),
'show_in_rest' => true,
'single' => true,
'type' => 'string',
]
);
Related Posts:
- Passing select control value to block
- Passing RichText attributes to function onChange
- How do I store information in a dynamic block in WordPress?
- How to create custom embed block in gutenberg wordpress
- How to use get_theme_mod in gutenberg editor wordpress?
- How to add Internationalization in WordPress using Javascript/React?
- how to disable blockrenderAppender inside all Innerblocks?
- WordPress Gutenberg react make import of __experimentalUseInnerBlocksProps which is no more experimetal
- Using SVN to upload plugin created with gutenberg blocks
- How to add custom table style for table block in gutenberg editor
- Gutenberg Block Style CSS Class Is Not Applying on Backend
- Why is the ‘Gutenberg’ Plugin generating an ‘Inconsistent File Permissions’ error when other Plugins, with the same permissions, do not?
- Set Multiple Meta Values as an Array Using dispatch( ‘core/editor’ ).editPost() Call in Gutenberg/JS
- Use a custom block in another block
- Gutenberg default attributes are empty when accessing in edit
- Set Button in PluginDocumentSettingPanel Content (WordPress Gutenberg)
- Has blocks gutenberg block multiples registers type in my Plugin
- Fixed: Console.log twice in the edit function
- How to resolve warning for `unstableOnSplit` prop on a DOM element in block editor
- How to dynamically add template in Innerblock?
- Block content rendering on the top just below body tag
- Gutenberg: Dynamic Block – Show saved data in the editor
- Create plugin with multiple blocks
- 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?
- Vanilla javascript in custom gutenberg block not working
- WordPress custom block: Link saved in database not retrieved when editing post
- Why is my Gutenberg block not saving and rendering the chessboard?
- How can we extent core/group or cover block?
- How to change the version of block.js and plugin to the same of Package.json?
- How do I apply different block supports to different parts of my custom block?
- Custom Gutenberg blocks not showing in WP editor
- is_plugin_active function doesn’t exist
- How can I find plugins’ slug?
- My custom made plugin has “a new version available” which links to unrelated plugin
- Where can I find a schema of wordpress plugin core architecture?
- How to fetch serialized data from wordpress options
- WordPress network: set themes and plugins for new blog
- How can I add a custom meta value on file upload?
- Advanced Custom Fields into functions.php
- Admin-ajax.php is dying “0” without processing function
- How do I register a stylesheet inside a WordPress widget?
- How to remove an Ajax action
- nonces in custom oop plugin
- Has anyone used require.js for handling plugin scripts?
- Multiple files in a plugin
- Wp die causing 500 Internal Server Error?
- Gutenberg Blocks – Change EDIT part of the block using editor.BlockEdit filters. How to change the markup?
- adding a new value to a serialized array in WP_option table
- Write to / remove from default .htaccess file from plugin?
- What is the best way to mimic a search query within a plugin
- Remove rewrite rules generated by plugin during deactivation
- Programatically download a plugin
- Call to a member function have_posts() on a non-object on normal loop
- Creating plugin using simple_html_dom parser?
- Not able to add option in Sub-Menu under page
- wp.media javascript issue with on select
- jQuery for custom plugin not working with Divi theme
- How to inform the user that the save was not successful?
- php page not found for plugin options menu
- Creating shortcodes in plugin
- Ordering taxonomies by rank
- Plugin Options not being output
- Can I create a table on my DB without creating a plugin?
- Submit Form data to another page via Ajax (WordPress Way)
- add_submenu_page returns null
- get_option / wp_localize_script Not Working in OOP Plug In
- Plugin generating unexpected output – on WP mysql dump import
- Remember the Meta Value With Radio Buttons
- How to embed a new string in url?
- Custom Module, Extending WP with a Plugin?
- Add hook after content without formatting
- User loggedin as Subscriber form not sending
- wc_get_template_part doesnt display the content [duplicate]
- How to properly use wp_mail() in my own plugin?
- admin_post hook not firing function inside class
- Thumbnail image doesn’t show up in Shortcode output
- I created a plugin with ‘view page’ that uses MYSQL + PHP. When I use wp_insert_post(), it turns everything to HTML
- how to auto random increment for post view
- Fatal error: require_once(): Failed opening required
- How to properly enqueue jQuery knob on WordPress without conflict?
- Looking for Image Slider that is based on default WP Media Library
- Not displaying Woocommerce product page in lightbox
- ajax voting for custom post type
- Can we validate data from jquery
- WordPress environment not loading properly
- Delete postmeta when uninstall/delete plugin
- how can i get records from wp_postmeta table using particular meta_key in database?
- show Visual form builder in the front end
- wordpress plugin | short code issue
- Custom wordpress plugin does not save select element
- Is it possible to create post in wordpress using postman?
- wp_enqueue_script doesn’t load JS in plugin
- AI Code For OpenAI
- Read page- or post-content across different builder-plugins
- How to make WordPress Plugin run on single specific Admin Page
- Frontend Enqueued Files in the Backend
- Why WP CLI command is not visible in VIP CLI