Blog: Wordpress

Enqueue Fontawesome in WordPress, without a plugin

Fontawesome for icons is … awesome.  The easiest way to use it is their CDN. It’s one less thing to serve from your hosting and, as it’s widely used, your site visitors may already have it cached in their browser (evidence here). In WordPress, to use the fontawesome CDN without using a plugin, and to use the best practice enqueue method, add this to your (child) theme’s functions.php   add_action( ‘wp_enqueue_scripts’, ‘prefix_enqueue_awesome’ ); /** * Register and load font awesome

Fixing WooCommerce 2.2.x upgrade errors

We’ve noticed a few minor but annoying problems emerging from recent WooCommerce 2.2.x upgrades. These relate to settings not persisting after upgrades. So, in the spirit of sharing with the community (and hopefully saving others some time!), here’s a few problems and their fixes: (Note: these issues may only affect older WooCommerce sites which may have originally been built using WC v1.6.x) Checkout not recognising the contact details WooCommerce has probably changed the default shipping address setting to ‘default to

WordPress tip: Rename “Posts” to “News”

Sometimes with WordPress websites the term ‘Posts’ isn’t ideal. For example, you might prefer the name ‘News’. Here’s how to rename “Posts” to “News”, and use “News article” as the label where appropriate, eg for single articles. Copy the code below to your functions.php file: /* Rename “Posts” to “News” And use “News article” as the label where appropriate, eg for single articles Source: http://www.consil.co.uk/blog/2013/09/27/quick-wordpress-tip-rename-posts-news/ */ add_action( ‘admin_menu’, ‘consil_change_post_menu_label’ ); add_action( ‘init’, ‘consil_change_post_object_label’ ); function consil_change_post_menu_label() {         global

How to resize and crop an image in WordPress

WordPress has a very handy in-built image editor. Here’s a quick screencast showing how to resize an image and crop it to exact dimensions. It’s all pretty easy, the only counter-intuitive thing is that the crop icon is selected by default – clicking that icon makes the crop occur so you do that when you’re happy with the size and crop settings. There’s no audio.

New WordPress Plugin: role-approved-comment

Update: this plugin is now hosted here on wordpress.org This plugin allows users in specified WordPress roles to have their comments automatically approved, while users in other roles require their comments to be approved by an editor. Until this plugin gets hosted on Worpress.com, here is version 1.0 for download: role-approved-comment.zip