0

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

1 Answer 1

0

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');
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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