Skip to content

Instantly share code, notes, and snippets.

@BoweFrankema
Created November 6, 2015 17:58
Show Gist options
  • Save BoweFrankema/38f262c1f44844bfe1e1 to your computer and use it in GitHub Desktop.
Save BoweFrankema/38f262c1f44844bfe1e1 to your computer and use it in GitHub Desktop.
Load AnsPress conditionally.
<?php
function wfc_load_anpress_when_needed() {
if ( is_anspress() ) {
ap_scripts_front();
}
}
add_action('wp_enqueue_scripts', 'wfc_load_anpress_when_needed', 1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment