Making WooCommerce Catalog Images Clickable

I spent much time doing research on making product images in my catalog clickable and there wasn’t a clear solution on how to do this so I did some trial and testing on my own and I succeeded!

Theme: Ferado
First I copied the file from parent theme (wordpress>wp-content>themes>ferado>woocommerce>content-product.php) to my child theme (wordpress>wp-content>themes>ferado-child>woocommerce>content-product.php). Locate the following code which render the product thumbnail.

<?php
  /**
  * woocommerce_before_shop_loop_item_title hook
  *
  * @hooked woocommerce_show_product_loop_sale_flash - 10
  * @hooked woocommerce_template_loop_product_thumbnail - 10
  */
  do_action( 'woocommerce_before_shop_loop_item_title' );
?>

and add the <a></a> codes highlighted in red before and after the above PHP codes.

<a href="<?php the_permalink(); ?>">
<?php
  /**
  * woocommerce_before_shop_loop_item_title hook
  *
  * @hooked woocommerce_show_product_loop_sale_flash - 10
  * @hooked woocommerce_template_loop_product_thumbnail - 10
  */
  do_action( 'woocommerce_before_shop_loop_item_title' );
?>
</a>

This applies to my theme and I hope it works for yours too!

Advertisements

Using WordPress to develop an eCommerce Website

For the past few weeks, I have paused all my work on Fiverr to focus on developing an eCommerce website for my friends. I have been using WordPress (not WordPress.com) to develop the website using Ferado theme by WooRockets and WooCommerce plugin.

There are plenty of guides to get me started. One good example is Setting up WordPress locally using MAMP so that my friends will only need to buy the website domain and hosting server after the website is ready. Once I have decided the theme to use (Ferado), I want to to customize it and to do that, the best practice is to Create a Child Theme. This is especially important if the theme has periodic updates and you won’t want the changes you made to disappear after the updates.

To help my friends cut down costs, I use themes and plugins that are free. Ferado was free just for one month at Envato but as a free user it means that I won’t be able to receive updates and support.

As an over precautious person, I backup my files and database before plugins and WordPress updates. For every customization I made, I pushed a copy of the theme and plugin folders to GitHub to track changes.

Till date, a few important tools I learnt using WordPress and SiteGround hosting are the PHP programming language (the dominant programming language in WordPress), PHPmyAdmin (for managing your database) and cPanel (for managing files for your website).