I have identified the problem but am wondering why it's a problem.
In my functions.php I have the following function:
add_action( 'pre_get_posts', 'add_my_post_types_to_query' );
function add_my_post_types_to_query( $query ) {
if ( is_home() && $query->is_main_query()) { //don't remove the 2nd clause or your menu will die!
$query->set( 'is_post_type_archive', 1 );
$query->set( 'is_archive', 1 );
$query->set( 'post_type', array( 'icod_project','post' ) );
}
return $query;
}
See my note there? If I remove "&& $query->is_main_query()" and then access the Widgets or Menu administration, my menu widget will no longer display on the site. Its widget remains intact, it just doesn't work.
So, the problem seems to be caused by the "$query->set" statements (who knows what that does under the hood), but why are they being called from the admin page? Shouldn't "is_home()" only return true if I am on the site's homepage?