WordPress: how to show metabox on any admin page?

I already know how to register a metabox for posts, pages and custom post types, but I would like to register a metabox that will be displayed on my user admin page, and this is not a message.

My plugin has a " Parameters Page " in the WordPress admin. I would like to show the metabox on this page itself.

Is it possible? If so, how can this be achieved?

I saw in the add_meta_box documentation that one of the possible values ​​of the $post_type dashboard parameter is, however, this is not documented anywhere. I assume that this will show the metabox in the WordPress dashboard (the main admin screen when logging in), but this is not what I need or need.

Edit:

This question is about OptionTree Metaboxes, which uses the standard WordPress Metaboxes. Perhaps there is a better way to do this by using OptionTree differently or by changing OptionTree? See This related question: How do I have more than one “Topic Theme” option on a page with OptionTree?

+4
source share
2 answers

if my understanding is correct, you can do it by following

Here is a demo plugin that will help you get it to work.

This WordPress plugin demonstrates how you can create your own WordPress page plugin using drag and drop meta boxes, requires WordPress Version 2.7, supports WordPress 2.8 a modified box layout engine

+2
source

Never tried, but just an idea. On the url plugin settings page, pass another say post-type parameter and specify any new message type name. Then use this parameter value in the add_meta_box () function $ post_type = $ _GET ['post_type'].

0
source

Source: https://habr.com/ru/post/1498531/


All Articles