Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #874217
    seanmanion
    Participant

    Hi There,

    For css, I use Jetpack. I do realize that it is 3rd party, but really enjoy the ability to have a backup of my css immediately available. With that said, I do not use “custom.css”. The issue is that http://prntscr.com/aq44pn

    My Request/Question:
    Is there any way that I can force that file to Not load?

    Much Appreciated,
    Sean

    #874784
    Rue Nel
    Moderator

    Hello Sean,

    Thanks for writing in! Would you mind providing us the url of your site with login credentials so we can take a closer look at your site? Do you have a child theme and custom functions? We would like to check something in your site that may have caused the issue in your site.

    To do this, you can make a post with the following info:
    – Link to your site

    – WordPress Admin username / password

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    Thank you.

    #875203
    seanmanion
    Participant

    Hello,

    I do not think this requires you to access the website. You can see that the same thing happens on many websites using X-Theme. On any of the links below, sort by load time (http://prntscr.com/aqhjn8), then you will see that “/?custom-css=1&csblog=1&cscache=______” is always in the top longest load times:

    1- http://tools.pingdom.com/fpt/#!/b6hiFK/http://gondwanaecotours.com/
    2- http://tools.pingdom.com/fpt/#!/bJ7m16/http://www.skiarpa.com/
    3- http://tools.pingdom.com/fpt/#!/br0lm5/https://literative.com/

    Again, I am requesting to know how to not load that file because it is not used in any way (I use jetPack css).

    Thank you.

    #875761
    Rue Nel
    Moderator

    Hi Sean,

    We need to check the site to identify the filename and its css style handle to be able to dequeue the file in your site.

    For the meantime, to properly unload or dequeue a css style, please do check out the codex;
    https://codex.wordpress.org/Function_Reference/wp_dequeue_style

    add_action( 'wp_enqueue_scripts', 'remove_default_stylesheet', 20 );
    
    function remove_default_stylesheet() {
        
        wp_dequeue_style( 'original-enqueue-stylesheet-handle' );
        wp_deregister_style( 'original-register-stylesheet-handle' );
    
        wp_register_style( 'new-style', get_stylesheet_directory_uri() . '/new.css', false, '1.0.0' ); 
        wp_enqueue_style( 'new-style' );
    
    }

    Hope this helps.

    #876861
    seanmanion
    Participant
    This reply has been marked as private.
    #877692
    Paul R
    Moderator

    Hi,

    To remove the stylesheet, you can add this in your child theme’s functions.php file.

    
    add_action( 'wp_enqueue_scripts', 'remove_default_stylesheet', 20 );
    
    function remove_default_stylesheet() {
        wp_dequeue_style( 'custom-css-css' );
        wp_deregister_style( 'custom-css-css' );
    }
    

    Hope that helps

    #878320
    seanmanion
    Participant

    Thank you. Though I was not able to see the desired effected based on the suggestion given, I realized that my issue was that JetPack CSS was the thing making the long load time. Using the child theme’s style.css instead of jetpack was a benefit. (..But I’m sad to not have the “restore previous version” ability..)

    #879047
    Darshana
    Moderator

    Glad you were able to figure it out 🙂

  • <script> jQuery(function($){ $("#no-reply-874217 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>