I am trying to add a new component panel under document tab, like categories, featured image etc.
相关问题
- Display product ACF field value in Woocommerce tra
- Adding a custom button after add to cart button in
- How to add a “active” class to a carousel first el
- Setting custom order statuses as valid for payment
- change the font size in tag cloud
相关文章
- wordpress新增页面如何个性化设置
- select query in wordpress
- Get WooCommerce featured products in a WP_Query
- Woocommerce update shipping methods in checkout vi
- Change order status just after payment in WooComme
- Publishing or uploading failed. Error message: “Th
- Facebook Login With WP JWT Auth
- Wordpress development process
They've added the PluginDocumentSettingPanel SlotFill now.
It's not in WordPress core yet, so you can either wait for core to be updated, or if you download the Gutenberg plugin, you can start using it now.
add_meta_box
will do the trick, but only if you add thecontext
-argument with a value of'side'
:Arrrh, two days for nothing!
Old answer
According to this tutorial, we can add our custom sidebar and fill it with customized form inputs.
Here is a working example in a React JSX version. This adds a meta field
country
:And in PHP, register the meta field in the
init
-hook:I know:
This is still not the required solution, but nearly.
add_meta_box adds a new panel there for the gutenberg editor
You can add this code to your function.php. This code create new tab and add text field to this tab. Text field save to database like custom field in post_meta table and you can output this like default WP post meta.
1. Create tab
Настройки UTM
.2. Create custom text field
utm_post_class
3. To output in website use
$utm = get_post_meta( $post->ID, 'utm_post_class', true );