Support » Fixing WordPress » Hide Meta Boxes on Custom Post Type

  • I know this is going to be flamed, and I’m sure an article exists telling me how to do this, but after an hour on Google and the Forums, I’ve given up.

    I simply want to HIDE default Meta Boxes on the Edit Post Page (including a custom post type).

    I do not want to remove them (ala: remove_meta_box), and I do not want to close them.

    I want to programmatically change the Screen Options and un-check the display option for certain Meta Boxes.

    [sig moderated as per the Forum Rules]

Viewing 3 replies - 1 through 3 (of 3 total)
  • This code goes in your functions file: http://pastebin.com/FntxMzGb

    All you have to do is change “frog” on line 4 to match your custom post type name. *If you just want it for normal posts change “Frog” to “post”.

    By default WordPress will not show anything in the array on line 5…so…if I wanted to hide my excerpt I would remove postexcerpt from the array.

    That’s it!! 🙂

    NOTE: This sets the default screen options, so if you have changed the options you may have to change the name of your custom post type or clean your database in order for the code to work.

    You sir are a unique and beautiful butterfly and I wish you happiness and rainbows henceforth!

    THANKS!

    [sig moderated as per the Forum Rules]

    That was a beautiful reply Ellis, and although it has nothing to do with me, it still made me smile.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hide Meta Boxes on Custom Post Type’ is closed to new replies.