问题
this is hopefully a very simple fix but i just noticed on my Add New/Edit Post Screen Options i don't have Categories to Enable/Disable (see pic). Any help muchos appreciated!!
回答1:
in wp-admin/includes/screen.php
we see:
<div class="metabox-prefs">
<?php
meta_box_prefs( $this ); // draw checkboxes in screen options
?>
</div>
and meta_box_prefs
function takes in account the get_hidden_meta_boxes
function:
function meta_box_prefs( $screen ) {
global $wp_meta_boxes;
$hidden = get_hidden_meta_boxes($screen);
// hide some boxes
}
An this function includes 2 filters default_hidden_meta_boxes
and hidden_meta_boxes
:
function get_hidden_meta_boxes( $screen ) {
// code
$hidden = apply_filters( 'default_hidden_meta_boxes', $hidden, $screen );
// code
return apply_filters( 'hidden_meta_boxes', $hidden, $screen, $use_defaults );
}
Mi conclusion is that one of your plugins is hiding categories
in your screen options
.
来源:https://stackoverflow.com/questions/12674827/wordpress-add-edit-post-screen-options-not-showing-categories