Skip to content

Instantly share code, notes, and snippets.

@anthonysbrown
Created January 17, 2022 20:52
Show Gist options
  • Save anthonysbrown/5c600042b2d91a254e4c0a7d08bd1e78 to your computer and use it in GitHub Desktop.
Save anthonysbrown/5c600042b2d91a254e4c0a7d08bd1e78 to your computer and use it in GitHub Desktop.
Include CDM scripts on any page
<?php
#add the filter
add_filter('sp_is_used', function($used){
global $post;
#add your condition, in this instance we are checking to see if the page id 80
if($post->ID == 80){
$used = true;
}
return $used;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment