In the StudioPress Support Forum, Charles Clarkson helped me with a problem that I've had for some time now. I have wanted StudioPress to change their .genesis-metaboxes .metabox-holder from its default of 800px to auto on the Theme Settings under Genesis tab (http://yourdomain.com/wp-admin/admin.php?page=genesis).
However, after every upgrade I had to edit the admin.css to make this happen.
So finally I posted this in the forums and Charles gave me the following code to free me from remembering to do that. And here it is:
[php]
add_action( 'admin_footer', 'child_widen_theme_settings' );
function child_widen_theme_settings() { ?>
<script type="text/javascript">
//<![CDATA[
jQuery(document).ready( function($) {
$( '.genesis-metaboxes, .genesis-metaboxes .metabox-holder' ).css( 'width', 'auto' );
//]]>
});
</script>
<?php
} [/php]
Leave a Reply