NO BUG: WooCommerce Cart Template: missing <main> tag

I have created a WooCommerce cart template following the instructions at Cart (WooCommerce) – Bricks Academy

This results in the following structure on the cart page:

< body>
< article>
< div class=“woocommerce”>
< section class=“brxe-section”>
< div class=“brxe-container”>CART ELEMENTS GO HERE
</ section>
</ div>
</ article>
</ body>

This does not match the default structure on other pages:
< body>
< main>
< section class="brxe-section">
< div class="brxe-container"></div>
< /section>
< /main>
< /body>

Consequently, css targeting elements based on the default structure, do not match.

  1. class is missing
  2. Additional with class ‘woocommerce’ is wrapping the page content

  3. Structure differs from default page structure

Am I doing something wrong or is this the expected structure of the cart page?

Hi Antoine,
Thanks so much for your report!

Please check if the cart page is rendered with Bricks instead of WordPress (you can see that in the WP Admin Bar). If so, the main tag should be there – if the page is rendered with WordPress, it’s the expected result.

Best regards,
timmse

Hi @timmse, thanks for the reply.

I can no longer reproduce the issue.

What I did notice is that, if I do not add an element to the shop page, the Bricks template for the shop page is not rendered. Instead, some default WooCommerce shop template is shown.

These are the steps:

  1. Create an empty ‘Shop’ page.
  2. Set it as the WooCommerce shop page
  3. Create a shop-template in Bricks Builder and apply it to the products archive and the single Shop page you just created
  4. View the ‘Shop’ page ==> some default WooCommerce shop template is shown.
  5. Using the Bricks Builder editor: add an empty div element to the page and save it
  6. View the ‘Shop’ page ==> the previously created shop-template is shown

No big issue, as adding the div will show the template, just unexpected that the template is not applied to an empty shop page.

Hi Antoine,
Sorry for the late reply. I followed your steps but can’t replicate the issue you’re describing.

If you want to continue investigating this, please record a screencast showing each step—preferably in a new, simple installation.