Quark 1.2.5 and WooCommerce 2.0.14
-
Thank you for the excellent theme, Anthony. Not only does the theme look great, in my opinion you’ve set the standard for how to comment a theme’s PHP and CSS. It’s very easy to work with.
I’m new to WordPress, so if this question isn’t in the appropriate forum please let me know. I’ve also searched for anything Quark and WooCommerce related, and I couldn’t find anything other than your comprehensive review of the WooCommerce plugin in 2012.
I’m building an e-commerce site using Quark 1.2.5, and I’d like to use the WooCommerce plugin 2.0.14. When I activated the plugin it warned me that the theme wasn’t compatible. They linked to their documentation on how to change the hooks in a theme so that the plugin doesn’t break the style of the theme. This is the code they recommend putting in the functions.php page to unhook their wrapper (see original documentation at https://docs.woothemes.com/document/third-party-custom-theme-compatibility/):
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10); remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
Followed by this code to hook the theme’s wrappers:
add_action('woocommerce_before_main_content', 'my_theme_wrapper_start', 10); add_action('woocommerce_after_main_content', 'my_theme_wrapper_end', 10); function my_theme_wrapper_start() { echo '<section id="main">'; } function my_theme_wrapper_end() { echo '</section>'; }
They say to look at our theme’s page.php to reference the correct mark-up for our theme’s ids and classes. So, looking to Quark’s page.php, I’m wondering if this is the correct edit to the code to make it work in Quark:
Change <section id=”main”> to <div id=”primary” class=”site-content row” role=”main”>
then change </section> to </div>
then put the code snippets in functions.php.
I understand this may be a question for WooCommerce, but I thought I’d ask you because I figured you’d know if the “wrapper” they’re referring to is <div id=”primary” class=”site-content row” role=”main”>…</div>.
Again, thanks for the excellent Quark theme.
Best Regards,
Trevor
- The topic ‘Quark 1.2.5 and WooCommerce 2.0.14’ is closed to new replies.