WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
[resolved] [Plugin: WooCommerce] Third party / custom theme compatibility (3 posts)

  1. albertorrent
    Member
    Posted 2 years ago #

    I want to use WooCommerce plugin with my theme, but I have some layouts problems.

    I used that guide but I don't know properly to fix it.

    ///GUIDE///
    Fixing the layout

    On the most part, WooCommerce templates will integrate nicely with most WordPress themes. Where you may run into problems is when the default WooCommerce content wrappers do not match your chosen theme’s. This will manifest itself by breaking your layout on WooCommerce pages and shifting your sidebars into incorrect positions. There are two ways to fix this; using WooCommerce hooks (resulting in maximum flexibility) or, since 1.4 using our catch-all woocommerce_content() function (less flexible).

    Using woocommerce_content() (1.4+)

    If you’re using 1.4 there’s an option to create a new template within your theme which will be used for all WooCommerce content. While an easy catch-all solution, it does have a draw back in that this template will be used for all WooCommerce pages. Product categories, user accounts, cart, checkout, everything. “Short-cuts lead to long delays” – you’ve been warned!

    The easiest way to implement this is to copy/paste page.php within your theme, rename it was woocommerce.php and replace the standard page loop with <?php woocommerce_content(); ?>. Upload and you’re done!

    Using hooks

    First unhook the WooCommerce wrappers;
    remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);

    remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);

    Then hook in your own;
    add_action('woocommerce_before_main_content', create_function('', 'echo "<section id=\"main\">";'), 10);

    add_action('woocommerce_after_main_content', create_function('', 'echo "</section>";'), 10);

    Making sure that the markup matches that of your theme. If you’re unsure of which classes or ID’s to use take a look at page.php for a guide.

    http://www.woothemes.com/woocommerce-docs/codex/third-party-custom-theme-compatibility/

    ///END GUIDE///

    I tried the Using woocommerce_content() (1.4+) metod but.. nothing.

    My site
    http://www.aceiteslaescarapela.com/tienda
    Using theme "Hermes"
    http://themeforest.net/item/hermes-for-business-corporate-resort-and-hotel/272347

    I can give my wp-admin access, can someone helpme please?

    Thanks!

    http://wordpress.org/extend/plugins/woocommerce/

  2. bensontrent
    Member
    Posted 2 years ago #

    Thank you! This really helped me out after LOTS of searching. Woocommerce docs are generally unhelpful and unsearchable. I used the <?php woocommerce_content(); ?> method in a custom page template. Woocommerce custom theme integration should be better documented!

  3. mikejolley
    Member
    Plugin Author

    Posted 2 years ago #

    Codex > Theming > Third party theme compatibility. http://wcdocs.woothemes.com/codex/third-party-custom-theme-compatibility/

    I don't think thats too difficult to find :) Search could be better though.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic