admin管理员组文章数量:1394181
I would like to add a checkbox field to the menu on the right, I googled it but i cant seem to find anything on it, just wondering if anyone has anything on it
I would like to add a checkbox field to the menu on the right, I googled it but i cant seem to find anything on it, just wondering if anyone has anything on it
Share Improve this question asked Feb 27, 2020 at 21:51 Ben FisherBen Fisher 1 2- Do you mean on the far right under Document? That is the Inspector sidebar. It depends on what you want the checkbox to do - you can add custom taxonomies or metaboxes that appear there as checkboxes, or if you want something completely different you could look into SlotFills. – WebElaine Commented Feb 27, 2020 at 22:36
- 2 the expanding and contracting parts are called panels, searching for how to add panels to the block editor will give more useful results – Tom J Nowell ♦ Commented Feb 27, 2020 at 22:38
1 Answer
Reset to default 0A legacy solution is to add_meta_box()
and set its context as side
. This makes the custom metabox visible in the block editor Document sidebar.
The modern way is to add a custom panel with Block API.
Or if you've registered a custom taxonomy with register_taxonomy()
, then you need to have show_in_rest
parameter set to true
to make it visible in the block editor.
本文标签: phphow to add custom select field to wordpress edit page
版权声明:本文标题:php - how to add custom select field to wordpress edit page 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744707897a2620950.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论