Bug in Chrome Breaks WordPress Admin Menu

Some of our clients experienced an issue with an update in Google Chrome 45 introducing a bug that breaks the WordPress admin menu.

To Fix:

1. Visit chrome://flags/#disable-slimming-paint in Google Chrome

chrome://flags/#disable-slimming-paint

2. Click the enable link under “Disable slimming paint”

Screen_Shot_2015-09-14_at_10_58_02_PM

 

3. Click the Relaunch Now button at the bottom of the screen.

Screen Shot 2015-09-14 at 11.05.08 PM

Details and how to on fixing the issue temporarily found on the awesome http://wptavern.com/a-bug-in-chrome-45-causes-wordpress-admin-menu-to-break

Optimizing Site with WooCommerce

If you are optimizing a site with WooCommerce, you might find that WooCommerce adds a lot of scripts and styles to every single page of your site. Most likely, this is unnecessary and can be optimized to improve page load times and page weights.

For a full explanation and background on the issue, check out https://wordimpress.com/how-to-load-woocommerce-scripts-and-styles-only-in-shop/ where Devin Walker breaks it all down. For posterity sake, here is the snippet of code that goes in the functions.php file of WordPress:

 

/**
 * Optimize WooCommerce Scripts
 * Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages.
 */
add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 );

function child_manage_woocommerce_styles() {
	//remove generator meta tag
	remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) );

	//first check that woo exists to prevent fatal errors
	if ( function_exists( 'is_woocommerce' ) ) {
		//dequeue scripts and styles
		if ( ! is_woocommerce() && ! is_cart() && ! is_checkout() ) {
			wp_dequeue_style( 'woocommerce_frontend_styles' );
			wp_dequeue_style( 'woocommerce_fancybox_styles' );
			wp_dequeue_style( 'woocommerce_chosen_styles' );
			wp_dequeue_style( 'woocommerce_prettyPhoto_css' );
			wp_dequeue_script( 'wc_price_slider' );
			wp_dequeue_script( 'wc-single-product' );
			wp_dequeue_script( 'wc-add-to-cart' );
			wp_dequeue_script( 'wc-cart-fragments' );
			wp_dequeue_script( 'wc-checkout' );
			wp_dequeue_script( 'wc-add-to-cart-variation' );
			wp_dequeue_script( 'wc-single-product' );
			wp_dequeue_script( 'wc-cart' );
			wp_dequeue_script( 'wc-chosen' );
			wp_dequeue_script( 'woocommerce' );
			wp_dequeue_script( 'prettyPhoto' );
			wp_dequeue_script( 'prettyPhoto-init' );
			wp_dequeue_script( 'jquery-blockui' );
			wp_dequeue_script( 'jquery-placeholder' );
			wp_dequeue_script( 'fancybox' );
			wp_dequeue_script( 'jqueryui' );
		}
	}

}

WordPress Plugins of 2015

 

Just a short list of some essential WordPress plugins for 2015.

Far Future Expiry Header #speed #caching

iframe #shortcode

WordPress SEO by Yoast #seo

WP Super Cache #speed #caching

Cache your site responses to speed up your site. Most WordPress sites should be aggressively caching their responses. This plugin can be a bit more difficult to setup with the large pile of options to configure.

UpdraftPlus #backup

Ninja like backups of WordPress to Dropbox and a myriad of other backup locations. Works incredibly smooth with lots of options.

YouTube #embed

For responsive youtube video embeds. Just drop the video url in the post and the plugin takes care of the rest.

 Seriously Simple Podcasting

Fully featured and simple podcasting through WordPress. Really impressed with how easy it is to setup podcasting and publish new podcasts. This plugin is also currently well maintained and up to date.

All In One WP Security & Firewall

Incredible plugin that helps you cover some of the basics of securing your WordPress installation. It also does a great job of monitoring the site for file changes that can be a good indicator of a site compromise if setup correctly.

Column Shortcodes

Really simple and easy to use shortcodes to give you the added functionality of adding columns where you need them in your posts and pages.

UPDATES

2015-05-29 Added youtube and seriously simple podcasting
2015-05-04 Added updraft plus
2015-09-19 Added Security plugin and column shortcodes plugin

Photo by Cristian Labarca CC BY-NC 2.0

Custom Icon for Custom Post Type in WordPress

If you have created a custom post type in WordPress then you should customize the icon for your custom post type. As of version 3.8 it’s a easy as adding another parameter to your post type.

  1. Visit http://melchoyce.github.io/dashicons/
  2. Pick desired icon and get name of icon
  3. Add name of dashicon to menu_icon parameter in register_post_type options array
'menu_icon' => 'dashicons-megaphone'

In context it looks like this:

add_action( 'init', 'create_post_type' );
function create_post_type() {
  register_post_type( 'experience',
    array(
      'labels' => array(
        'name' => __( 'Experiences' ),
        'singular_name' => __( 'Experience' )
      ),
      'taxonomies' => array( 'category' ),
      'public' => true,
      'has_archive' => true,
      'menu_icon' => 'dashicons-megaphone',
      'supports' => array(
        'title',
        'editor',
        'author',
        'thumbnail',
        'custom-fields',
        'comments',
        'revisions'
      )
    )
  );
}