WordPress.org

Forums

Testimonial Slider
Deregister scripts and style on pages that use plugin (1 post)

  1. Sjourney
    Member
    Posted 1 year ago #

    How do i deregister testimonial-slider on pages it isn't being used on?

    I'm trying to do something like this in my functions.php

    add_action('wp_head','my_conditional_script',0);
    function my_conditional_script() {
        if (is_front_page() || is_home()) {
            remove_action('init','testimonial_slider_init');
            remove_action('wp_print_styles', 'testimonial_slider_enqueue_styles', 999);
            remove_action('wp_enqueue_scripts', 'testimonial_slider_enqueue_scripts', 999);
            remove_action('wp_head', 'testimonial_slider', 999);
        }
    }

    https://wordpress.org/plugins/testimonial-slider/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Testimonial Slider
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.