Hot answers tagged

2

Add this function in your theme's functions.php function my_enqueue($hook) { if ('post.php' != $hook ) { return; } wp_enqueue_script('my_custom_script', get_template_directory_uri() . '/js/myscript.js'); } add_action('admin_enqueue_scripts', 'my_enqueue');` In myscript.js place this code jQuery(document).ready(function(){ jQuery('#...



Only top voted, non community-wiki answers of a minimum length are eligible