Quantcast
Channel: Toolset » All Posts
Viewing all articles
Browse latest Browse all 20145

Reply To: Set Types custom fields metabox to closed by default

$
0
0

Hi Joff,

It is possible by creating a java-script in the wp-admin side, like this

I assume the slug of your custom fields metaboxes is "my-group", which need to be collapsed by default
1) create a js file "myjs.js", upload it in your web server, with code in it:
jQuery( document ).ready( function( $ ) {
$('#my-group').addClass('closed');
});

2) add codes in your theme/functions.php
function my_enqueue($hook) {
wp_enqueue_script( 'my_custom_script', 'http://URL of myjs.js' );
}
add_action( 'admin_enqueue_scripts', 'my_enqueue' );

More help: http://codex.wordpress.org/Plugin_API/Action_Reference/admin_enqueue_scripts

Please let me know if you need assistance to do it

Regards
Luo


Viewing all articles
Browse latest Browse all 20145

Trending Articles