Thursday, 17 August 2017

Wordpress Hook To Add Specific Script to Specific Page Template

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');

No comments:

Post a Comment

Google Map Filter Api Example

Here is Google Map Filter Api Example: