Forums

Hide Meta Boxes on Custom Post Type (3 posts)

  1. glaxton
    Member
    Posted 7 months 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
    Member
    Posted 7 months 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. glaxton
    Member
    Posted 7 months ago #

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

    THANKS!

    [sig moderated as per the Forum Rules]

Reply

You must log in to post.

About this Topic