Tag: wordpress

0

WooCommerce: Use Product Images as Category Images

So, earlier this morning I found myself wishing that WooCommerce had the capability to use a product thumbnail when displaying a category link in situations where the category doesn’t have its own thumbnail defined.

I went on a bit of a hunt and found a couple of small plugins. One didn’t work at all, which I attribute mainly to it having not been updated for two years and much changing in both WordPress and WooCommerce since then, and another one that I found didn’t work until I made a couple of code changes – and had a couple of noteworthy problems;

  • it would only fetch product thumbnails from that immediate category – not delving deeper down into the category tree and fetch product thumbnails from child categories, and
  • it did no filtering for products that had no thumbnails set, so would in some cases return products that had no thumbnail

So, I’ve made my own. A zip download can be found below, you just need to drop the folder inside it into your wp-content/plugins folder and then activate the “WooCommerce Category Product Thumbnails” plugin.

I’m using WordPress 4.8.2 and WooCommerce 3.1.2 – please let me know in the comments if it doesn’t work on other versions.

Download the plugin (1.6KiB Zip)

0

Site upgrade

I’ve spent the last couple of days converting my site to the WordPress platform, rather than using my own bespoke content management platform.

It’s taken me far too long to start espousing the benefits of WordPress over other systems, but having done an increasing amount of work with it in the last year I’m now happy that the majority of problems I had with it are no longer an issue, so why not take advantage of it, eh?

I’ve also changed the underlying markup to be based on the Bootstrap framework (version 4 alpha, to be precise) so please do let me know if you spot anything amiss.