Customising Rendering of HTML in Product by Tag Block – Help!
-
I am wanting to customise the html rendered when products are displayed using the woocommerce ‘Product by Tag‘ block.
All the action seems to happen in the ‘AbstractProductGrid.php‘ file under BlockTypes.
I think the following filter should be the solution for me.
apply_filters(‘woocommerce_blocks_grid_item_html’,…)
However, just to check that I’m following the right path, I changed the following function to return the title with dashes on either side of it.
get_title_html( $product )
return ‘<div class=”wc-block-grid__product-title”>’ . ‘-‘ . $product->get_title() .’-‘ . ‘</div>’;
However, on displaying the page on the web site, the title still displays without the dashes on either side of it. This has left me puzzled as to whether I’m going down the right track.
I’ve tried displaying the site on another device just in case caching was the reason, but still the change I made does not appear to be recognised.
Is anybody able to comment on this for me by way of explanation or suggestion?
thanks
- The topic ‘Customising Rendering of HTML in Product by Tag Block – Help!’ is closed to new replies.