You might try dumping (i.e., “export[ing]” the POD to a JSON file and examine and compare those sub-groups in the JSON code. I suspect one sub-group has a switch set causing it to display expanded. The JSON code would show this difference.
I had a look at json_encode() which I’ll try next time, I’ve been mainly using “printr()”.
I changed both of them to “advanced” for “Meta Box Context” and that seems to have done the trick.
That didn’t seem to work after all. It is not consistent or it might remember (sometimes whether I expanded it).
@dbareis As far as I know, there is no setting for this. One would need to add JavaScript to force the default open and closed states. For example, for meta box groups titled “Group 1” and “Group 2”:
<?php
add_action( 'admin_footer-post.php', 'modify_meta_group_visibility', 1000 );
add_action( 'admin_footer-post-new.php', 'modify_meta_group_visibility', 1000 );
function modify_meta_group_visibility(){
?>
<script>
jQuery(document).ready(function($){
$('#pods-meta-group-1').removeClass('closed');
$('#pods-meta-group-2').addClass('closed');
});
</script>
<?php
}
@pdclark
Thanks for the response Is “jQuery” an API that is always available?
I’d want them both open so I would use “.removeClass(‘closed’)” and the “.addClass(‘open’)”
I’m not sure why you have both meta’s mentioned and use close on both on different methods…