Title: Remove Unwanted Scripts
Last modified: June 19, 2023

---

# Remove Unwanted Scripts

 *  Resolved [egornmore](https://wordpress.org/support/users/egornmore/)
 * (@egornmore)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/remove-unwanted-scripts/)
 * Hello, how I can remove plugin scripts from pages where plugin is not used? (
   such as swiper, easy-ticker, script.js )

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Charles Cormier](https://wordpress.org/support/users/charlescormier/)
 * (@charlescormier)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/remove-unwanted-scripts/#post-16830008)
 * Hi [@egornmore](https://wordpress.org/support/users/egornmore/),
 * This scripts are needed for advanced post block.
   Thanks!
 *  Thread Starter [egornmore](https://wordpress.org/support/users/egornmore/)
 * (@egornmore)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/remove-unwanted-scripts/#post-16830311)
 * I am using Advanced Post Block on one page only, so I don’t want to load unwanted
   scripts on pages where the plugin is not used.
 * Already figured out how to remove swiperJS and easyTicker:
 *     ```wp-block-code
       function dequeue_post_block_scripts() {
       	if( ! is_page( array( 1490, 13843 ) ) ) {
       		wp_dequeue_script( 'swiperJS' );
       		wp_deregister_script( 'swiperJS' );
       		wp_dequeue_script( 'easyTicker' );
       		wp_deregister_script( 'easyTicker' );
       	}
       }
       add_action( 'wp_print_scripts', 'dequeue_post_block_scripts' );
       ```
   
 * Can you please guide me how I can dequeue plugin’s CSS?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Remove Unwanted Scripts’ is closed to new replies.

 * ![](https://ps.w.org/advanced-post-block/assets/icon-256x256.png?rev=3469085)
 * [Advanced Post Block – Showcase Posts with Grid, List, Card Layouts and Filters](https://wordpress.org/plugins/advanced-post-block/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-post-block/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-post-block/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-post-block/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-post-block/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-post-block/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [egornmore](https://wordpress.org/support/users/egornmore/)
 * Last activity: [2 years, 11 months ago](https://wordpress.org/support/topic/remove-unwanted-scripts/#post-16830311)
 * Status: resolved