Avada Forums Community Forum Avada and Woocommerce 100% page width

Tagged: ,

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • brokomnet
    Participant
    Post count: 4

    Hello,

    I was wondering whether it was possible to set a 100% width for a shop page. All my pages except single product page were designed to be 100% in width but for some reason I cannot find the usual option to select the template in “Page attributes” menu. I found one forum post describing how to fix it by editing clasa-avada-layout.php but that makes all your pages 100% (including the product page) which is not the desired effect.

    Caitlin Bauer
    Participant
    Post count: 7

    Any luck with this?

    Michael
    Keymaster
    Post count: 667

    Hi there

    The Woocommerce shop page, by default, is an archive and thereby 100% Width and will only work if you have set the overall Site Width to 100% in the Avada Theme Options >> Layout section.

    You have two options as a workaround:

    1 – Deselect the shop archive from the WooCommerce settings. Set up a new WP page and assign the 100% Width page template -> https://d.pr/i/ZfmfGo – Using WooCommerce Shortcodes to display you shop content -> https://docs.woocommerce.com/document/woocommerce-shortcodes/

    2 – A custom solution, add this code to your child themes functions.php file:

    /* 100% width Woocommerce shop archive */
    function woohundredwidth_is_hundred_percent_template($value, $page_id) {
    if (is_shop() || is_product_category()){
    $value=true;
    }
    return $value;
    }
    add_filter( 'fusion_is_hundred_percent_template', 'woohundredwidth_is_hundred_percent_template', 11, 2 );

    Thank you kindly

    Caitlin Bauer
    Participant
    Post count: 7

    So there’s no way to enable the page templates for the woocommerce product archive page?

    Would be really helpful to be able to control the width of the woocommerce header content width since it appears to be a separate entity from the archive content that appears below it.

    designbyoomph
    Participant
    Post count: 7

    Hi there, thanks for the above advice, deselecting the shop page in the settings worked. However is there any downside to doing this whereby there might be links in say the accounts page or the basket/checkout page that will try and reference the default original <url>/shop link, thus resulting in a page not found link?

    Thanks 🙂

    rcg2000
    Participant
    Post count: 4

    It appears that this breaks things with Avada 6.0.2:

    2 – A custom solution, add this code to your child themes functions.php file:

    /* 100% width Woocommerce shop archive */
    function woohundredwidth_is_hundred_percent_template($value, $page_id) {
    if (is_shop() || is_product_category()){
    $value=true;
    }
    return $value;
    }
    add_filter( 'fusion_is_hundred_percent_template', 'woohundredwidth_is_hundred_percent_template', 11, 2 );
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.