• I have a map loaded on a contact page, but the css/js from your plugin is loaded on every page, which isn’t needed.

    Do you have any kind of filter available I can use in functions.php, to only load cs/js based on particular conditionals? So if I was able to write something like:

    if( !is_page_template('contact') ) {
    	return false;
    }

    …to prevent those resources being loaded, unless it’s the page template specified. Do you have such a filter?

    Thanks.

The topic ‘Load scripts/styles on specific pages/templates?’ is closed to new replies.