Updates, Tips & Tricks

Updates as Released, Plus My Personal Collection Of WordPress Best Practices

Remove / Dequeue Affiliates Pro Default Stylesheets

27 March

Here’s a simple function and hook combo you can add to your functions.php to dequeue the Affiliates Pro default stylesheets.

function remove_affiliates_stylesheets() {
    wp_deregister_style( 'affiliates' );
add_action( 'wp_print_styles', 'remove_affiliates_stylesheets', 101 );

You may alternatively need to swap the wp_print_styles with wp_enqueue_scripts like so:

add_action( 'wp_enqueue_scripts', 'remove_affiliates_stylesheets', 101 );
No comments yet.

Leave a Reply