• Resolved Ali Sadiq

    (@devalisadiq)


    Hi I have disabled styles from plugin settings but the “jquery.colorbox-min.js” and “custom.js” are still being added on the front-end which are enqueued at wp-rss-aggregator/includes/shortcodes.php

    Shouldn’t disabling styling should disable colorbox on frontend too? Or maybe a separate checkbox in settings to disable scripts too?

    The issue is that I have even tried dequeue-ing them from child-theme and they still show up on front-end.

    I used a simple function in my child-theme

    
     function theme_abc_dequeue_script() {
       wp_dequeue_script('jquery.colorbox-min');
       wp_dequeue_script('wprss_custom');
    }
    add_action( 'wp_print_scripts', 'theme_abc_dequeue_script', 100 );
    

    And

    
     function theme_xyz_dequeue_script() {
       wp_dequeue_script('jquery.colorbox-min');
       wp_dequeue_script('wprss_custom');
    }
    add_action( 'wp_print_footer_scripts', 'theme_xyz_dequeue_script', 100 );
    
Viewing 2 replies - 1 through 2 (of 2 total)
  • renzms

    (@renzms)

    @devalisadiq

    Can you please detail to us what it is your are trying to accomplish with the core plugin and why you would need to disable our scripts?

    Thread Starter Ali Sadiq

    (@devalisadiq)

    These scripts are not needed on the front-end of my website so this is just unused code and extra bytes and I want to dequeue them.

    When it comes to performance, every byte counts.

    Google want us to make sites faster and lighter and we can only do this together (Plugin developers and theme developers).

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Dequeue scripts on frontend’ is closed to new replies.