• Resolved Rodrigo

    (@rghedin)


    Hi,

    I always use the compact podcast and block all extra CSS that SSP loads. (A while ago, I reported a bug that it was loading CSS files for the “modern” player even when the compact/HTML one was in use.)

    Recently, some new version of SSP started loading a new CSS file, recent-episodes.css. I tried to block it via functions.php, using this code:

    function smartwp_remove_wp_block_library_css(){
     wp_dequeue_style( 'ssp-recent-episodes-css' );
    }
    add_action( 'wp_enqueue_scripts', 'smartwp_remove_wp_block_library_css', 100 );

    It didn’t work.

    Any idea how to stop SSP from loading this CSS file?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Jonathan Bossenger

    (@psykro)

    Hi @rghedin thanks for bringing this to our attention.

    The handle by which the CSS is loaded is ‘ssp-recent-episodes’, WordPress adds the ‘-css’ when the style is rendered on the front end, so you would just need to change your function to:

    wp_dequeue_style( 'ssp-recent-episodes' );

    However, it would be ideal if this only rendered the recent episodes CSS when the relevant episode list is rendered, so I have logged this as a bug and we’ll look into updating the plugin to fix this.

    https://github.com/CastosHQ/Seriously-Simple-Podcasting/issues/561

    Thanks

    Thread Starter Rodrigo

    (@rghedin)

    It worked, Jonathan!

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Unnecessarily loading recent-episodes.css’ is closed to new replies.