Skip to content

Instantly share code, notes, and snippets.

@kostasx
Last active March 17, 2020 06:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kostasx/ede27c5fdc1d9642801a65be0e27b270 to your computer and use it in GitHub Desktop.
Save kostasx/ede27c5fdc1d9642801a65be0e27b270 to your computer and use it in GitHub Desktop.
Execute JavaScript on Specific Posts or Pages using the Insert Headers and Footers WordPress Plugin
<!-- Insert in the Footer Area of the Plugin: -->
<script>
if ( document.querySelector("body.postid-NUM") ){
// Code to be executed on the selected Post or Page with ID NUM goes here...
// Replace NUM with the ID Number of your Post or Page
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment