aishazafar
aishazafar

Reputation: 1120

how to override woocommerce/loop/loop-start.php

I am newbie to wordpress and woocommerce. I have to change

<ul class="products"> to <div class="myclass">. 

For that I just coppied plugins/woocommerce/loop/loop-start.php in mytheme/woocommerce/loop/loop-start.php and changed the file loop-start.php accordingly. But this change does not apply to shop page of my theme. Any help will be appriciated.

Thanks in advance,

Aisha

Upvotes: 3

Views: 14140

Answers (2)

Tarei SuperChur King
Tarei SuperChur King

Reputation: 329

Since WooCommerce 2.0.0 a loop-start.php file was introduced. This file will need to be changed in order to update your class in the product loop.

wp-content\plugins\woocommerce\templates\loop\loop-start.php

and past it on your theme at

yourtheme\woocommerce\loop\loop-start.php

Upvotes: 8

Denish
Denish

Reputation: 2810

Just tested Below solutions for you, It worked.

Copy loop-shop.php file from

wp-content\plugins\woocommerce\templates\loop-shop.php

and past it on your theme at

yourtheme\woocommerce\loop-shop.php

Find with <ul class="products"> code </ul> and replaced with <div class="myclass"> code </div>

Upvotes: 9

Related Questions