Posts

  • WooCommerce Custom Product Sorting

    Introduction In this tutorial you will learn how to add custom sorting for the product archive page Renaming the existing sorting option Re-ordering the option in sort dropdown Overriding sorting form template and add meaningful title for the sorting dropdown Quick overview of how to create plugin (Yes, all our customisation are plugin based except adding title to the sorting dropdown) Quick Overview Plugin Creation Go to the following path wp-content/plugins in your WordPress Project Create a new directory and name it like vg-woo-sort For naming the plugin I follow the following convention either my initial or project initial hyphen…

    read more

  • WooCommerce Theme Overriding

    Introduction For every task there are many good and bad ways to do that WooCommerce theming also fall under this prey like directly editing the WooCommerce template files In one fine day WooCommerce may release a new version, you unintentionally update the WooCommerce plugin which results in replace of your beautiful custom shop page into default template So to avoid this we have to override our WooCommerce template in our theme directory Let’s we see it in detail Detect Template to Override To detect which template your current page renders you can place this snippet in your activated theme’s functions.php…

    read more

  • Create Executable Images

    Introduction In this tutorial you will learn how to create executable image file Using the image you can perform any programmatic logic behind displaying an image The image created using PHP may not look unusual except the file extension will be .php We will overcome this drawback with Apache’s htaccess file with rewrite rules to masquerade our PHP file as image file Prerequisite Though you can use any image library like ImageMagick for this masquerading technique but we are planned to use GD image library GD is an open source graphics library GD library ‘s PHP official documentation link: GD…

    read more