0

My theme uses some custom options fields, like post excerpt, that were removed from the editor screen with WP 3.1

I understand and support the intent to clean up the content workspaces. However, as a result of the 3.1 upgrade, I have had several support requests related to the fields that suddenly disappeared with 3.1

I issued a tech bulletin informing my theme owners of the change and how to get the excerpts field back using the "Screen options" button, but its still an issue for many users.

Is it possible, from functions.php, to reset the screen options for a given WP screen?

For example, I want to bring back the "excerpts" field to the post editor screen as well as the "Posts" selector when editing/creating "Custom Menus".

PS: I understand that these options can be manually configured via "Screen options", but you might be surprised how many users have never seen or used that button :-)

We tend to narrowly focus on the elements we are intent on working with at that instant and block out everything else. I do it myself and its human nature.

Perhaps what we really need is a little electronic genie that whispers into our ear:

"The field you are looking for, the one that was here before and is now gone, is behind that little button up there. Click it and you will open up a new wing of your WordPress world...and you will be better for it"

1 Answer 1

4

http://wordpress.org/support/topic/troubleshooting-wordpress-31-master-list?replies=14 a few posts down has instructions for default 'ON' options

// Change what's hidden by default
add_filter('default_hidden_meta_boxes', 'be_hidden_meta_boxes', 10, 2);
function be_hidden_meta_boxes($hidden, $screen) {
    if ( 'post' == $screen->base || 'page' == $screen->base ) {
        // removed 'postcustom',
        $hidden = array(
            'slugdiv', 
            'trackbacksdiv', 
            'postexcerpt', 
            'commentstatusdiv', 
            'commentsdiv', 
            'authordiv', 
            'revisionsdiv'
        );
    }
    return $hidden;     
}
3
  • exactly the solution I was looking for. +1 for a quick, spot-on reply. I appreciate it :-)
    – Scott B
    Commented Apr 6, 2011 at 15:39
  • Thanks i upgraded a site recently and lost all the Excerpts was wondering where they went lol ! ++ for the answer
    – Xavier
    Commented Apr 6, 2011 at 15:41
  • Yeah, the new 'default' is supposed to be simpler. If you had customized screen options before 3.0, your screen wouldn't have changed. If you left it at default, then on upgrade you went to the new simpler default. Commented Apr 6, 2011 at 15:45

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.