facebooktwitterskypeRSS Feed
telephone: (920) 215-1842
facsimile: (866) 456-2115

Removing unneeded theme files

When creating a new design for a website I like to start with a blank theme. To do this I use the wp_framework theme. I have been working on reducing the javascript files that are not absolutely important.

There is a function called framework_media() which prints the html code to include the javascript files. I wanted to disable the javascript files found in this theme. To do this replace the framework_media() function with the code below. Be aware that without this code hovering over any sub pages on the main navigation will lose some functionality. If you don’t have any sub navigation you don’t need to worry about reducing the linked javascript files.

/**
 * framework_media() loads javascripts and styles
 *
 * @since 0.2.3
 */
function framework_media() {
	if( is_admin() ) return;
	wp_enqueue_script( 'jquery' );
	//wp_enqueue_script( 'hoverIntent' );
	//wp_enqueue_script( 'supersubs', JS . '/supersubs.js', array( 'jquery' ) );
	//wp_enqueue_script( 'bgiframe', JS . '/jquery.bgiframe.min.js', array( 'jquery' ) );
	//wp_enqueue_script( 'superfish', JS . '/superfish.js', array( 'jquery' ) );
	//wp_enqueue_script( 'screen_js', JS . '/screen.js', array( 'jquery' ) );
}

 

Related posts:

  1. Reduce the size of VMware VMDK files

Leave a Reply