WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Hiding Windows in the Admin (1 post)

  1. noelgreen
    Member
    Posted 3 years ago #

    I thought I'd share this just in case someone else is wondering how to do it.

    Say you want to hide all the custom modification windows in the back-end admin of wordpress. The things like "excerpt" or "custom fields". Just giving people who post via the admin the options of title and body copy. Removing temptation to try and add things they shouldn't. This is how to do it.

    In your functions.php add the following line...

    function append_stylesheet(){?>
    <link rel='stylesheet' href='<?php echo bloginfo('template_url'); ?>/admin.css' type='text/css' /><?php }

    Then create an "admin.css" file and put it in your template directory. In that file add this code.

    #normal-sortables,
    #postexcerpt,
    #postcustom,
    #revisionsdiv,
    #commentstatusdiv,
    #trackbacksdiv,
    #commentsdiv {
    	display: none;
    }

    That will hide everything.

    You can remove any of the id tags to have something show if you like. It's pretty self explanatory, but #postexcerpt is the the "excerpt" tab... #rivisionsdiv is the "revisions" tab and so on.

    The only thing you might wonder about is #commentstatusdiv is the window for the "discussions" tab.

    Hope that helps someone!

Topic Closed

This topic has been closed to new replies.

About this Topic