ThemeShaper Forums » Thematic

[closed]

don't need widgets - speed-up page loading?

(9 posts)
  • Started 3 years ago by oldmankit
  • Latest reply from oldmankit
  • This topic is not resolved

Tags:

  1. The only widget I use is the one for inserting plain text/html into the sidebar. It feels a bit unecessary. (I don't know much about php or whatnot, so I could be wrong.)

    Would removing widgets and replacing the sidebar with my own html directly be worth while? How would I go about that? I saw this:

    function remove_widgetized_area($content) {
        unset($content['Secondary Aside']);
        return $content;
    }
    add_filter('thematic_widgetized_areas', 'remove_widgetized_area');

    but it didn't seem to do anything.

    I can also see sidebar.php. If I just delete everything in there and replace it with my html, will I have a satisfactory solution?

    Posted 3 years ago #
  2. Addendum: I use one widget, the search box. Is there is a way to do this without a widget?

    Posted 3 years ago #
  3. Hello,

    I've learned a bit about wordpress lately and guess I could do the search form easily using <?php get_search_form(); ?>

    Regarding removing the sidebar. I tried deleting all the widgets from sidebar.php, but it seemed to increase page load times, rather than decrease.

    Should I stop trying now and just use the wordpress super cache plugin?

    Kit

    Posted 3 years ago #
  4. i've never heard of removing widget areas as a tactic for speeding up page loading. your first function should unset the secondary aside from the widgets array and thus be unavailable in the backend - and therefore never show in the front end. you could conceivably unset them all if you want. (or maybe set $content = array() //an empty array) I regularly unset many b/c i think it is confusing for some of my clients who only need a sidebar.

    if you aren't using widgets then i wouldn't worry much about them. they don't load so they aren't like the reason your site is slow. try the FF plugins YSlow and/or Page Speed. there are htaccess tricks you can pull to speed things up, you can also minify css and js files... as well as reduce the number of both... (i think WP_Minify will do this, but haven't gotten to try it yet) and move scripts to the footer. then you can use a caching plugin. W3 Total Cache is also a good one.

    Posted 3 years ago #
  5. Hello helgatheviking,

    Thanks for taking the time to help me get things straight.

    I'll ditch the idea of a static sidebar without any widgets and focus on what's most important.

    I started off with something you posted elsewhere which avoids loading scripts I don't use (I don't have menus on this blog).

    Then I got my head around wp_enqueue_scripts to ensure scripts were loaded after the rest of the page if possible.

    I've put all of my css in one file, and have beautified it. I may gzip it too.

    The biggest problem on my site (here) is image loading. I'm thinking about thumnail size and then image quality for shutter. I love high-quality, but most people don't love waiting.

    I'll keep on...

    Thanks again.
    Kit

    Posted 3 years ago #
  6. kit- i just did some stuff with speeding up my sites. i am using a combination of 3 plugins: wp-minify (or autoptimize is a possible choice), wp-supercache (or w3 total cache) and wp-htaccess

    use wp minify to minify everything- scripts, styles and html.

    i use this to switch over to google's api and the little fix for the problem that wp minify causes when they minify and combine all scripts and put it above the jquery.js.... = breakage.

    /*
     *  Scripts and Header
     */
    function clean_header(){
    
    	// CLEAN UP HEADER
    	remove_action( 'wp_head', 'wlwmanifest_link'); // Remvoes link for Windows Live Writer users
    	remove_action( 'wp_head', 'wp_generator'); // Removes WP version
    	remove_action( 'wp_head', 'rsd_link' ); // Removes unneeded Really Simple Discovery link
    	remove_action( 'wp_head', 'start_post_rel_link'); //Remove relational start link
    	remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head'); // Remove prev/next relational links
    
    	//use google's jquery
    	if (!is_admin()){
    		wp_deregister_script( 'jquery' );
    		wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js');
    		wp_enqueue_script('jquery');
    	 }
    }
    add_action('init','clean_header');
    
     /*prepare WP-Minify plugin to play nice w/ google's jquery*/
    function add_minify_location(){
    	if (class_exists('WPMinify')) {?>
    
    <!-- WP-Minify JS -->
    <!-- WP-Minify CSS -->
    
    <?php }
    }
    add_action('wp_head','add_minify_location',99);

    use wp-htaccess to add some rules. you don't have to:, you could do htaccess by hand and ftp:
    http://forums.themeshaper.com/topic/slow-site-network-solutions-blames-thematic

    then use wp-supercache to cache everything.

    you can also try compressing your images at http://smush.it/

    and maybe using the wordpress plugin for lazy loading. i think there is a smush.it plugin- but i couldn't get it to work.

    Posted 3 years ago #
  7. oh and if you dont need animated drop downs you can get rid of the header scripts too

    add this in w/ the rest from above

    remove_action('wp_head','thematic_head_scripts');

    Posted 3 years ago #
  8. Wow, there's a lot you can do to optimise speed!

    As I said, I already did

    // Filter away the default scripts loaded with Thematic
    function childtheme_head_scripts() {
        // Abscence makes the heart grow fonder
    }
    add_filter('thematic_head_scripts','childtheme_head_scripts');

    I hadn't thought of trimming down that unnecessary header stuff.

    I've just removed all script from my header by deregistering l10n.js (something to do with localisation, which I don't really want in my English-language blog). Removing the script can break things, apparently, but it hasn't for me.,..

    Posted 3 years ago #
  9. I will also do image 'smushing', since it seems to be reducing my images by about 25% without any loss of quality. Super-cache and minify are also on the menu...

    Posted 3 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.