Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Is there any way to set a checkbox for WYSIWYG box in this options so admin is able to hide it in case there's no need for content in a page

share|improve this question
add comment

1 Answer

The content box is in a <div> with an ID of #postdivrich so you can hide it using CSS.

Probably the easiest thing to do is to add a settings option to an existing page so you can turn it off or on. The post below covers that in detail:

http://wpengineer.com/2139/adding-settings-to-an-existing-page-using-the-settings-api/

After you have the setting in place, you need to check for it and output CSS in the right place. Add this to functions.php:

if (get_option('paradise_hide_editor') == 'yes') {
    function paradise_hide_editor() {
        echo '
        <style type="text/css">
        #postdivrich {display: none}
        </style>';
    }
    add_action('admin_head', 'paradise_hide_editor');
}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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