• Tom

    (@jeffreeeeey)


    Hi,

    Below is the contents between the HEAD tags on my website:

    <head profile="https://gmpg.org/xfn/11">
    <title>website name</title> 
    
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" type="text/css" href="https://mywebsitename.co.uk/web/wp-content/themes/sitename/style.css" media="screen" /> 
    
    <!--[if lt IE 7]>
    <script src="https://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE7.js" type="text/javascript"></script>
    <![endif]--> 
    
    <link rel='stylesheet' id='seo-style-css'  href='https://mywebsitename.co.uk/wp-content/plugins/seo-pressor/templates/css/styles.css?ver=3.1' type='text/css' media='all' />
    <link rel='stylesheet' id='shadowbox-css-css'  href='https://mywebsitename.co.uk/wp-content/plugins/shadowbox-js/shadowbox/shadowbox.css?ver=3.0.3' type='text/css' media='screen' />
    <link rel='stylesheet' id='shadowbox-extras-css'  href='https://mywebsitename.co.uk/wp-content/plugins/shadowbox-js/css/extras.css?ver=3.0.3' type='text/css' media='screen' />
    <link rel='stylesheet' id='contact-form-7-css'  href='https://mywebsitename.co.uk/wp-content/plugins/contact-form-7/styles.css?ver=2.4.4' type='text/css' media='all' />
    <link rel='stylesheet' id='wp_sidebarlogin_css_styles-css'  href='https://mywebsitename.co.uk/wp-content/plugins/sidebar-login/style.css?ver=3.1' type='text/css' media='all' />
    <script type='text/javascript' src='https://mywebsitename.co.uk/wp-includes/js/l10n.js?ver=20101110'></script>
    <script type='text/javascript' src='https://mywebsitename.co.uk/wp-includes/js/jquery/jquery.js?ver=1.4.4'></script>
    <script type='text/javascript' src='https://mywebsitename.co.uk/wp-content/plugins/sharebar/js/sharebar.js?ver=3.1'></script>
    <script type='text/javascript' src='https://mywebsitename.co.uk/wp-content/plugins/stray-quotes/inc/stray_ajax.js?ver=3.1'></script>
    <link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://mywebsitename.co.uk/web/xmlrpc.php?rsd" />
    <link rel="wlwmanifest" type="application/wlwmanifest+xml" href="https://mywebsitename.co.uk/web/wp-includes/wlwmanifest.xml" />
    <link rel='index' title='mywebsitename' href='https://mywebsitename.co.uk/' />
    <meta name="generator" content="WordPress 3.1" />
    <link rel='shortlink' href='https://wp.me/blah' /> 
    
    <!-- All in One SEO Pack 1.6.13.2 by Michael Torbert of Semper Fi Web Design[206,277] -->
    <meta name="description" content="blah, blah, blah />
    <meta name="keywords" content="blah, blah, blah" />
    <link rel="canonical" href="https://mywebsitename.co.uk/" />
    <!-- /all in one seo pack -->
    <link rel="stylesheet" type="text/css" href="https://mywebsitename.co.uk/wp-content/plugins/collision-testimonials/i/css/styles.css" media="all" /><script type="text/javascript">
    //<![CDATA[
    var _wpcf7 = { cached: 1 };
    //]]>
    </script>
    <link href="https://mywebsitename.co.uk/wp-content/themes/mysitename/styles/brown.css" rel="stylesheet" type="text/css" /> 
    
    <script type="text/javascript" src="https://mywebsitename.co.uk/wp-content/themes/mysitename/includes/js/stepcarousel.js"></script>
    <script type="text/javascript" src="https://mywebsitename.co.uk/wp-content/themes/mysitename/includes/js/stepcarousel-setup.js"></script> 
    
    <link rel="pingback" href="https://mywebsitename.co.uk/xmlrpc.php" />
    </head>

    …this explains why WordPress is very slow to load pages.

    Now, I’m no expert, but it looks like it’s all the CSS and JS files that are slowing down the site.

    So my question is- how do I stop those files from loading automatically, and is it possible to combine all those stylesheets into one?

Viewing 16 replies (of 16 total)
  • I love this idea of stripping the css file and making one. I have pasted the code into Functions.php in the wp-includes folder. I put in the correct css… in this case nggallery.css, and get an error that the call is invalid, and my site does not load. All i did was paste the code snippet, and replace the css with the nggallery.css.

    Is there a particular place in functions.php for that code. I can send you what I did if that will help:

    add_action( ‘wp_print_styles’, ‘my_deregister_styles’, 100 );

    function my_deregister_styles() {
    wp_deregister_style( ‘nggallery.css’ );
    // deregister as many stylesheets as you need…
    }

    Is what I put in Functions.php

    Please advise…

    Thanks.

Viewing 16 replies (of 16 total)
  • The topic ‘CSS and JS slowing down WordPress- how to combine’ is closed to new replies.