BuddyBoss Home – Web › Support Forums › Themes › Boss. theme › Child Theme not activating a woocommerce template
Tagged: widget, WooCommerce
- This topic has 25 replies, 5 contibutors, and was last updated 9 years, 2 months ago by Anonymous.
Question
June 14, 2015 at 6:45 pm #41274@matthewjamesboyd1984Hi,
I’m using a buddyboss child theme for my website physiocourse.com. I’m making a products page using woocommence which is working fine with buddyboss so far. The problem is that I want to use the facetWP plugin to help users drill down through my displayed products, when I set up that plugin to do so the Boss Child theme seems to be ignoring the template file. I’ve had the developer of FacetWP (Matt Gibbs) take a look at it but he hit a brick wall. He asked me to see if you guys could offer any insight.
This is the problem we are having:
How do we get WooCommerce to use the archive-product.php template within a BuddyBoss child theme? As of now, it seems to completely ignore it.Can you help me with this?
Thanks,
Matthew BoydAnswers
June 15, 2015 at 8:45 am #41284@alyssa-buddyboss
AlyssaParticipant@matthewjamesboyd1984 do you have the same issue if you use the twentyfifteen theme?
June 15, 2015 at 8:53 pm #41304@matthewjamesboyd1984Yeh, I tried it in the twenty fifteen and twenty thirteen themes, they seem to ignore it as well.
June 16, 2015 at 8:26 am #41313@alyssa-buddyboss
AlyssaParticipant@matthewjamesboyd1984 then this is most likely a WooCommerce issue. You will need to contact them for support.
June 16, 2015 at 8:30 am #41315@matthewjamesboyd1984OK, thanks TJ
June 17, 2015 at 10:54 am #41342@alyssa-buddyboss
AlyssaParticipantLet us know what they figure out or if you need additional support
July 12, 2015 at 6:54 pm #42536@bentasm1This is *not* a WooCommerce issue. This is an issue in Boss.
WooCommerce has two ways to handle templates, the right way, and the fast way.
The right way, is /themes/yourtheme/woocommerce/…… with templates modified from /plugins/woocommerce/templates. By doing it this way, all pages can be properly customized.
The fast way, is /themes/yourtheme/woocommerce.php. This is what Boss does. The problem with woocommerce.php is it’s a “catch all” for WooCommerce, and does not allow any customization of actual template files. It will break a lot of WooCommerce plugins that rely on customizing the archive-products.php, including the one I author, because you don’t have all the right hooks/actions to play with.
http://docs.woothemes.com/document/third-party-custom-theme-compatibility/
So, the problem is Boss related, not WooCommerce related, unfortunately……
July 12, 2015 at 7:13 pm #42537@matthewjamesboyd1984Thanks for your comments Ben. Why is it that it happens with twenty fifteen though?
July 12, 2015 at 8:45 pm #42539@bentasm1Most likely because you have copied it into /themes/yourtheme/archive-product.php, which is the wrong location. The correct location would be /themes/yourtheme/woocommerce/archive-product.php. That’s my guess based on your first posts screenshot showing it in the wrong directory.
Oddly, that’s a completely different problem, but with the way Boss uses woocommerce.php to override it, it wouldnt matter if it was in the right directory for Boss anyway.
July 13, 2015 at 5:50 am #42556@matthewjamesboyd1984Hi Ben,
Thanks for following up. I tried dropping it into that location for twenty thirteen but I’m still not seeing the filters on the archive page. I’ve attached a screenshot.
Do you still think this is a Boss issue or should I take what you told me back to the FacetWP developer and get him to try again?
July 13, 2015 at 7:58 am #42565@bentasm11.) Test with TwentyFifteen, not TwentyThirteen.
2.) The issue will always be Boss related, because of Boss using woocommerce.php, which overrides archive-product.php.
These are two separate issues, they just happen to be the same problem, but with two completely separate reasons why. 🙂
If you cant get it to work with TwentyFifteen, you’re either doing it wrong (most likely) or FacetWP has a bug (very unlikely).
July 13, 2015 at 9:47 am #42569@matthewjamesboyd1984Hi Ben,
OK, I see what you mean. I’ve tried it with Twenty Fifteen and it’s still not working. I must be doing something wrong. I’ll take what you’ve said to the FacetWP developer and try and get it to work on Twenty Fifteen then I’ll ask TJ again.
Thanks for your help Ben, I’ll let you know if we get anywhere.
July 14, 2015 at 9:26 am #42623@alyssa-buddyboss
AlyssaParticipant@matthewjamesboyd1984 just found this tutorial for placement: https://v4.datafeedr.com/documentation/580
We also follow the directions here: http://docs.woothemes.com/document/third-party-custom-theme-compatibility/You could try removing woocommerce.php from the parent theme and then add this to functions.php:
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10); remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10); add_action('woocommerce_before_main_content', 'buddyboss_theme_wrapper_start', 10); add_action('woocommerce_after_main_content', 'buddyboss_theme_wrapper_end', 10); function buddyboss_theme_wrapper_start() { echo '<div id="primary" class="site-content"> <div id="woo-content" role="main">'; } function buddyboss_theme_wrapper_end() { echo '</div><!-- #content --> </div><!-- #primary -->'; }
NOTE: Not tested and you may need to remove the woo-content div.
July 18, 2015 at 6:47 am #42936@matthewjamesboyd1984Hi @tjchester,
Ok, thanks for the advice. But if I remove woocommerce.php from the parent theme will I not just have the same problem every time woocommerce release an update?
Thanks,
MatJuly 18, 2015 at 8:31 am #42952@alyssa-buddyboss
AlyssaParticipant@matthewjamesboyd1984 nope, this is upgrade safe, the only thing you would need to do is remove the woocommerce.php file every time you update the Boss theme, but if this solution does work for you then we can implement it into the theme and remove the woocommerce.php file.
- The question ‘Child Theme not activating a woocommerce template’ is closed to new replies.