Hide Meta Boxes on Custom Post Type (4 posts)

  1. Ellis Benus
    Posted 3 years ago #

    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]

  2. joshrodgers
    Posted 3 years ago #

    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.

  3. Ellis Benus
    Posted 3 years ago #

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


    [sig moderated as per the Forum Rules]

  4. son0fhobs
    Posted 2 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic