Support » Plugin: YARPP - Yet Another Related Posts Plugin » disable YARPP stylesheet

  • Resolved c-m

    (@c-m)


    I’m using the YARPP plugin, and have incorporated the style-sheet into my main theme.

    As such I’d like to disable the YARPP stylesheet to help reduce the amount of requests.

    What is the best way of doing this?

    Should I just dequeue it in the theme functions file or is there another way?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author yarpp

    (@jeffparker)

    Hi @c-m we have a filter to do this easily:

    https://support.shareaholic.com/hc/en-us/articles/4408775687060

    Dequeue YARPP’s CSS Style Sheet (related.css):

    add_filter( 'yarpp_enqueue_related_style', '__return_false' );

    Dequeue YARPP’s Thumbnails Template Style Sheet (styles_thumbnails.css):

    add_filter( 'yarpp_enqueue_thumbnails_style', '__return_false' );

    Thread Starter c-m

    (@c-m)

    Brilliant. Thanks.

    Thread Starter c-m

    (@c-m)

    Actually, I’m still getting YARPP widget.css loading.

    Plugin Author yarpp

    (@jeffparker)

    @c-m what version of YARPP are you on?

    Thread Starter c-m

    (@c-m)

    4.4 haven’t seen any point in upgrading since I haven’t come across any any security issues, and it has been performing as I like so far.

    Plugin Author yarpp

    (@jeffparker)

    Yikes – highly recommend upgrading – we’re currently on 5.27.8.

    v4 series is over 5 years old.

    Version 4 also doesn’t support PHP 6+.

    You’re currently missing out on a lot – and the filters listed above also won’t work as your current version doesn’t support them.

    Thread Starter c-m

    (@c-m)

    Fair play. Will upgrade. I’m using PHP 7+

    Plugin Author yarpp

    (@jeffparker)

    @c-m were you able to sort this out on your end?

    Thread Starter c-m

    (@c-m)

    Unfortunately no.

    I have upgraded to version 5.27.8

    Added the following to functions.php for the theme I’m running:

    //dequeue YARRP stylesheets
    add_filter( 'yarpp_enqueue_related_style', '__return_false' );
    add_filter( 'yarpp_enqueue_thumbnails_style', '__return_false' );

    Disabled my cache manager after clearing cache.

    Yet both the YARPP thumbnail.css and related.css are still be called.

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.