Posted on

Show Table in Only Shop page

When we turn on ‘Table On Archives’ table will show on WooCommerce Archive/Category/Tag/Attribute page. But if you only want to show table on shop page, we can do this using filter hook.

if (!function_exists('wpt_show_table_only_shop')) {
	function wpt_show_table_only_shop($my_archive, $template){
		if(!is_shop()){
			return $template;
		}
		else{
			return $my_archive;
		}
	}
	add_filter('wpto_archvie_page_template_loc', 'wpt_show_table_only_shop', 10, 2);
}

Still no luck? We can help!

Submit a Request

Contact us and we’ll get back to you as soon as possible.