How to Add Code into WordPress Theme Functions.php

Sometimes you need to modify or update WooCommerce settings by using filter or action hook. But if you are totally newbie, do refer content below to get better understanding on how to do that.

Adter you login successfully to WordPress Admin, you can see “Appearance” sidebar menu on your left. Mouse over that and click “Editor” link. It will show “Edit Themes” page, default will be your current theme.

On your right sidebar got a list of files, do click “Theme Functions (functions.php)” link. You will see the file content, do paste below code before symbol ‘?>’ at the bottom.

For example:

add_filter('loop_shop_columns', 'custom_loop_columns');
if (!function_exists('custom_loop_columns')) {
	function custom_loop_columns() {
		return 3; //Display 3 products per row