What are you trying to do?
Adding the class span4 to the <li class=”post-1561 ..”>
And where is this UL list being generated from?
The shop home so http://website.com/shop on the main woocommerce shop page
Ok you can copy the file content-product.php from your WC plugins folder within templates and paste into your theme folder woocommerce folder templates keeping the same structure.
Then you can modify the content-product.php to your liking. The li tag is in that file.
Or…it may be possible to filter it by post_class like.
add_filter( 'post_class', 'yourfunction' );
Not sure about this one but worth a try and you may need to target the post type since post_class is used in different places…
Thank you, I found it! How blind of me
Here is an even better solution where you don’t need to copy the template.
add_filter( 'post_class', 'addspan' );
function addspan( $classes ) {
if ( is_shop() ) {
$classes[] = 'span4';
return $classes;
}
}
Thanks a lot, that’s even better indeed