Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 96636

MCM on "[Theme: Pinboard] JS performance tips"

$
0
0

I have tested the following and perhaps you would benefit from this...

I placed the following my child theme functions.php because

1. I do not use the Audio/Video player i.e. disabled mediaelementplayer
2. I assumed fitvids is to do with videos, but I use a custom plugin for videos so I disabled - fitvids.js

3. I do not use the slider disabled - flexslider.js

4. Also removed (related to poitn 1) the css

This is 4 javascript request less, which may help with performance.

// Theme Scripts
add_action( 'wp_print_scripts', 'pinboard_deregister_javascript', 100 );
function pinboard_deregister_javascript()
{

    wp_deregister_script( 'mediaelementplayer' );
	wp_deregister_script ('fitvids');
	wp_deregister_script ('flexslider');

}

function pinboard_deregister_styles()
{

    wp_deregister_style( 'mediaelementplayer' );

}
add_action( 'wp_print_styles', 'pinboard_deregister_styles', 100 );

Can anybody tell me what fitvids does?

Let me know if this works for you?

Also if you have other suggestions in this regard


Viewing all articles
Browse latest Browse all 96636

Trending Articles