Devin Walker is a San Diego based entrepreneur, developer and designer.

Roots Theme and WooCommerce Duplicate Header, Sidebar and Footer Fix

Posted on Mar 22, 2013 in Coding, Web Development, WordPress | One Comment

roots-theme

Roots theme makes use of the excellent Theme Wrapper which helps to cut down greatly on code clutter within your WordPress theme. WooCommerce doesn’t play nicely with this logic and you may notice duplicate headers within your code:

Roots Theme Duplicate Headers

How to Fix the Duplicate Headers

1. Create a Blank header.php file in your theme directory:

add-blank-header-to-roots

Duplicate Sidebar and Footer with Roots and WooCommerce

Beware of duplicate sidebar and footer content. The fix is the same… simply create a blank footer.php or sidebar.php in the base theme directory.

That’s It! WooCommerce will see this header file and use it appropriately. As well, Roots will continue to use templates/head.php across your non-woocommerce pages and posts.

Thanks to @raffjones over for providing the following solution over at this post on stack overflow: Roots Theme and Woo Commerce – duplicated header

If you know of a better solution please post in the comments below! Now go have fun with Roots and WooCommerce development.

1 Comment

  1. Eric Iffland
    April 27, 2013

    Brilliant and simple solution