• Resolved anartfulscience

    (@anartfulscience)


    Hello,

    I’d like to dequeue the style and js so I can add concat them within my asset pipeline.

    Can you let me know the names please?

    wp_dequeue_style(‘CB_Vegas-inc-min-css’);
    wp_dequeue_script(‘CB_Vegas-inc-min-js’);

    Thanks, Stephen

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Demis Patti

    (@demispatti)

    Hello Stephen

    I myself use several scripts and one stylesheet. And then there are those included in the third party libraries.
    To get an overview over ALL loades scripts and styles, you can place the following function in your functions.php file. It’ll print the handles of all loaded assets to the screen.

    NOTE: Do not use it on a productive environment, since it’ll print the list on both backend and frontend – it is for debugging purpose only.

    // Gets A List Of All Loaded Scripts And Stylesheets
    //add_action( ‘wp_print_scripts’, ‘dp_inspect_custom_scripts_and_styles’ );
    function dp_inspect_custom_scripts_and_styles() {

    $scripts_list = null;
    $styles_list = null;
    global $wp_scripts;
    global $wp_styles;
    // Runs through the queue scripts
    foreach ( $wp_scripts->queue as $handle ) : $scripts_list .= $handle . ‘ | ‘;
    endforeach;
    // Runs through the queue styles
    foreach ( $wp_styles->queue as $handle ) : $styles_list .= $handle . ‘ | ‘;
    endforeach;
    printf( ‘Scripts: %1$s Styles: %2$s’, $scripts_list, $styles_list );
    }

    Uncomment the add_action function and you’re good to go. Comment it again afterwards.
    “My” scripts and styles should all be prefixed with “cb-vegas”.

    I hope this helps ??

    Regards,

    Demis

    Thread Starter anartfulscience

    (@anartfulscience)

    Thanks Demis, that’s really helpful & most appreciated.

    All the best, Stephen

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘dequeue problem’ is closed to new replies.