Google Page Speed Insights – Optimize Images

First, don’t let Google Insights drive you to chase an ROI that might not be there. Maybe for 1M of image data improvement, it is worth looking into – but after awhile that tool will have you minifying 1K css files to save 100 bytes. Second, regarding images – don’t just blindly reduce (‘compress’…really a … Read more

Remove Query String from Google jQuery

Filter ‘script_loader_src’, you get the source URL as first argument. Then run remove_query_arg() on this URL and return the shortened version. Sample code: add_filter( ‘script_loader_src’, ‘remove_script_version_parameter’ ); function remove_script_version_parameter( $src ) { return remove_query_arg( ‘ver’, $src ); }

Is there a way to embed a Google Docs form in a page without using plugins?

No, that’s not possible. You can find a list of providers for embeddable coontent in wp-includes/class-oembed.php: ‘#https?://(www\.)?youtube.com/watch.*#i’ ‘http://youtu.be/*’ ‘http://blip.tv/*’ ‘#https?://(www\.)?vimeo\.com/.*#i’ ‘#https?://(www\.)?dailymotion\.com/.*#i’ ‘#https?://(www\.)?flickr\.com/.*#i’ ‘#https?://(.+\.)?smugmug\.com/.*#i’ ‘#https?://(www\.)?hulu\.com/watch/.*#i’ ‘#https?://(www\.)?viddler\.com/.*#i’ ‘http://qik.com/*’ ‘http://revision3.com/*’ ‘http://i*.photobucket.com/albums/*’ ‘http://gi*.photobucket.com/groups/*’ ‘#https?://(www\.)?scribd\.com/.*#i’ ‘http://wordpress.tv/*’ ‘#https?://(.+\.)?polldaddy\.com/.*#i’ ‘#https?://(www\.)?funnyordie\.com/videos/.*#i’ ‘#https?://(www\.)?twitter.com/.+?/status(es)?/.*#i’ ‘#https?://(www\.)?soundcloud\.com/.*#i’ ‘#https?://(www\.)?slideshare.net/*#’ ‘#http://instagr(\.am|am\.com)/p/.*#i’ Google is not in that list, so you have to ask the administrator.

Automatically post to Google+ on new post

Google does not currently have a public API to allow posting to G+ from anywhere other than their web interface. The scripts that currently do so are using the “mobile” interface to do so, and as such are fragile at best. Additionally, they don’t work with 2-step verification (which you should enable on your Google … Read more

Fall Back Google CDN in JavaScript

Scripts don’t get printed at the wp_enqueue_scripts hook, but rather at the wp_print_scripts hook. That said: don’t echo/print scripts, period. Instead, enqueue them properly. Caveat: This method is Plugin territory, and should not be included as Theme code in a publicly distributed Theme. You deregister jQuery, but the step you’re missing is registering and enqueueing … Read more

Rich Snippets for WordPress

To be clear, the Rich Snippets tool is purely for testing what the formatting/markup of your content is already. It does nothing on its own. Most of the markup that the tool is looking for is usually baked into a theme. WordPress helps this along a little bit by incorporating parts of the hAtom format … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)