WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Sjourney
    Member
    Posted 2 months 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/

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.