Add javascript and CSS into Wordpress template // Add custom field in woocommerce wp-admin

Add javascript and CSS into Wordpress 

add_action( 'admin_enqueue_scripts', 'load_admin_style' );
function load_admin_style() {
 //wp_register_style( 'admin_css', get_template_directory_uri() . 'assets/css/admin-style.css', false, '1.0.0' );
//OR
wp_enqueue_style( 'admin_css', get_template_directory_uri() . '/assets/css/virtue.css', false, '1.0.0' );
}

//Second solution : two or more files.
add_action( 'admin_enqueue_scripts', 'load_admin_styles' );
function load_admin_styles() {
//wp_enqueue_style( 'admin_css_foo', get_template_directory_uri() . '/admin-style-foo.css', false, '1.0.0' );
//wp_enqueue_style( 'admin_css_bar', get_template_directory_uri() . '/admin-style-bar.css', false, '1.0.0' );
}


Add custom field in woocommerce wp-admin  

http://www.remicorson.com/mastering-woocommerce-products-custom-fields/

No comments:

Post a Comment

Pages