Here is the Wordpress Hook To Add Specific Script to Specific Page Template:
function customJS()
{
if (is_page_template('page-template-cart-checkout.php')||is_page_template('page-template-my-account.php')):
include ("woocommerce-states.php");
endif;
}
add_action('wp_enqueue_scripts', 'customJS');
function customJS()
{
if (is_page_template('page-template-cart-checkout.php')||is_page_template('page-template-my-account.php')):
include ("woocommerce-states.php");
endif;
}
add_action('wp_enqueue_scripts', 'customJS');
No comments:
Post a Comment