Skip to content

Instantly share code, notes, and snippets.

@wplit
Last active May 20, 2026 01:09
Show Gist options
  • Select an option

  • Save wplit/c488267526d78e20b245e9c355026df3 to your computer and use it in GitHub Desktop.

Select an option

Save wplit/c488267526d78e20b245e9c355026df3 to your computer and use it in GitHub Desktop.
remove glossary-hovercards scripts where it's not needed (which in turn, removes the tippy dependancy)
<?php
add_action( 'wp_footer', function() {
// Option 1: Remove on specific pages
if ( is_page( array( 'your-page-slug', 'another-page' ) ) ) {
wp_dequeue_script( 'glossary-hovercards' );
wp_deregister_script( 'glossary-hovercards' );
}
// Option 2: Remove on specific post types
// if ( is_singular( 'page' ) ) {
// wp_dequeue_script( 'glossary-hovercards' );
// wp_deregister_script( 'glossary-hovercards' );
// }
}, 11 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment