I am creating a new custom admin page. For reasons I cannot explain here (due to the length of the explanation), I cannot create the custom admin section via Custom Post Type, but rather, I have to create this page manually (and by that I mean, I had to add the side menus and sub menus manually, then add page content manually.... etc.).

Now, I need to create admin "widgets" (I am not sure if this is the correct terminology, but I will explain what I mean by "widgets" in the next paragraphs).

As you can see in the attached screenshot:

enter image description here

One of those widgets is "Categories" (which is circled in red), another is "Publish", and a third is "Format" and so on.

I need the following

  1. What WordPress method/action should I use to add those widgets (example is the "Categories" widget circled in red?

  2. How to make those widgets draggable? (I need to have the flexibility of changing their location)

  3. How do I make those widgets collapsible (e.g., the green circles around the collapse/expand arrows show what I need)

  4. How to add the "Screen Options" drop down (circled in orange)

  5. How to add a screen option for each widget I need to show/hide (example, the "Categories" screen option that is circled in red in the top right of this above image, would show/hide the "Categories" widget that is circled in red)

Important Note: This may seem to be a number of different questions, but I thought those should be asked together, because they are related, I think.

I do not need a full answer, all I need is a pointer to the method, or methods, used for my needs, so I can dig deeper.

I really appreciate your help and cooperation. Cheers.

1 Answer 1


To give you a brief answer you need to create a custom post type.

For example a custom post type of property. When you set this up you declare what sections are visible to the user to be able to edit. Such as title, content, excerpt, author and so on.

When you set your custom post type you ca add custom sections that will appear aswell as / instead of the current fields. You can do this using add_meta_box() function.

For the bits you circled in red. You need to add taxonomies into the mix. You can do this by using wp_insert_term() function.

Good place to start - https://codex.wordpress.org/Post_Types

  • A requirement is not to use "Custom Post Types", however, I will look into the "Add Meta Box" function
    – Greeso
    Commented May 15, 2017 at 2:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.