Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #889652

    lkd
    Participant

    Hellon
    Thanks for the great job done integrating The Grid into X Theme.
    I really like this!

    But i’m trying to use the grid template as woocommerce product archive template.
    In their documentation it is said to do it like this:
    http://theme-one.com/docs/the-grid/#!/grid_as_template

    In the template file wp-content/themes/x-child/woocommerce/archive-product.php
    In these files, you will find the main loop:

    if ( have_posts() ):
    while ( have_posts() ): the_post();

    // some code from your theme
    // …
    // …

    endwhile;
    endif;

    You just need to replace all the previous php code by this line of code:

    The_Grid(‘My Grid Name’, true); // where true is for template mode

    I did it but it is not working. Is that way of doing comply with X theme coding? or is there something else to customize?

    Thanks for your help

    and by the way is there a way to make The Grid us woocommerce product attributes as filtering options?

    #890211

    Rupok
    Member

    Hi there,

    Thanks for writing in! It should work with X if you implement this correctly. Unfortunately this kind of customization is out of our support scope.

    Thanks for understanding.

    #1114893

    M Pez
    Participant

    I have made the modifications as specified in The Grid documentation “Use The Grid as a Template” for WooCommerce (and this is working with other themes such as the 2015 theme) but as the previous user mentioned, the modification instructions for replacing the normal shop template with a template from The Grid are not working with the X theme.

    Can you please explain where you guys are overriding the default code that is normally executed by the WooCommerce archive-product.php file? This file is being ignored by the X theme (wp-content/plugins/woocommerce/archive-product.php).

    I am not asking you guys to code it for me. I am just trying to understand how or where you are overwriting the default behavior of the “archive-product.php” file.

    Thanks.

    #1115176

    Christian
    Moderator

    X uses woocommerce_content function in x\framework\views\[stack]\woocommerce.php. For more details about the function, please see https://docs.woocommerce.com/wc-apidocs/function-woocommerce_content.html.

    You will need to work around or replace that function with your own.

    Thanks.