SOLVED: How to override Bricks parent theme file from child theme

I’m trying to add the “TI WooCommerce Wishlist” plugin to my woocommerce website. Since Bricks has no support for this plugin I had to add their shortcode to the Products.php file located at
bricks\includes\woocommerce\elements\products.php

The shortcode worked as I wanted, But now I want to make the changes inside a child theme so that the changes don’t get removed on the next update.

I tried to add the products.php file to the child theme with the same folder names but it’s not working.

How can I overwrite the Products.php file inside the parent theme from my child theme?

Hi Robin,

Welcome to the forum!

When using a custom template that makes use of the products element, you can try to add another field to the element with your shortcode inside of it. This way around, you don’t have to edit the code directly.

Besr regards,
timmse

I tried that but the shortcode is rendered as text on the frontend. The shortcode I used is [ti_wishlists_addtowishlist loop=yes]
I also tried do_shortcode("[ti_wishlists_addtowishlist loop=yes]") both didn’t work.

Ah ok, I’ll take a look at the plugin tomorrow and get back to you as soon as possible :v:

1 Like

Hi Robin,

You are right. The shortcode is not rendered but only displayed as text.

I have just added the issue to our bug tracker and expect it to be fixed shortly. Until then, unfortunately, you’ll have to do without the Wishlist feature in your product overview or continue adding the shortcode directly into the template (which, as you correctly pointed out, is not such a good idea).

I move this thread to the Bugs Category.

Best regards,
timmse

I’m also very much looking forward to this fix, as I’m about the implement the same plugin into a new Woocommerce site.

Hi guys,

I just wanted to let you know that this bug is fixed in Bricks 1.3.7.
It is also possible to do something like this: [bartag foo="{post_title}"] aka Shortcode + Dynamic Data Tag :star_struck: