• Resolved jrothra

    (@jrothra)


    Everything works find with the Moesia (free) theme and WooCommerce except for this one thing: WC breaks out of the content boxes. It seems to ignore the page template type (Full widge, default, etc.; I use full width for pages).

    See the difference:
    WC: https://www.johnrothra.com/store/
    Standard Full Width: https://www.johnrothra.com/missionalbranding/outreach-strategy/

    I’d like WooCommerce to remain in that white box at full width, but I’m not sure how. I tried looking at the page code (Chrome DevTools) and found that the same ID name is used on both, so if I edit the CSS for that ID, it’ll impact both (not good). Help?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello @jrothra,

    It looks like your Store page is already full width, have you already resolved your issue?

    Kind Regards, Roman.

    Thread Starter jrothra

    (@jrothra)

    Roman,

    Actually no. As stated in the OP, Moesia places the content into bordered boxes, as shown in the second link. When you select “Full width” for the page template, it removes the widgeted sidebar and makes the main content box wider.

    However, WooCommerce is ignoring/overriding the theme’s page template. This is evident in the first link, where you can see there is no bordered white box.

    So while the store may visually resemble full width, it is, in fact, not. Why? Because WooCommerce is not working within the established page template (in this case, “Full width” as evidenced by the lack of the box. I want that box used for the store, as well).

    Another example of this problem would be another site I’m working on using the same theme. The URL is www. keithrothra .com/store (spacing is intentional to prevent links and bots — this store isn’t ‘live’ yet). As you can see, there is no box, the sidebar is shoved down, and the text is almost invisible due to the background image. The template set for the store page is “full width.” Thus, WooCommerce is ignoring/overriding the established page templates and tossing out that desired — if not needed — box used by Moesia.

    • This reply was modified 7 years, 9 months ago by jrothra.
    • This reply was modified 7 years, 9 months ago by jrothra.

    Hello @jrothra,

    I have just checked your Store page one more time, your products area is of container width. Can you please try to add two more products?

    Kind Regards, Roman.

    Thread Starter jrothra

    (@jrothra)

    It’s not about how wide it is nor how many products are showing; the problem is the missing bordered box. There are two products (I only have two) on johnrothra.com. However, as you should be able to see on both sites I mentioned (and back to my OP), there is no bordered box (I provided a link to another page to show what I mean). This indicates that WooCommerce is ignoring or overriding the theme’s default design of using bordered boxes.

    • This reply was modified 7 years, 9 months ago by jrothra.
    • This reply was modified 7 years, 9 months ago by jrothra.
    • This reply was modified 7 years, 9 months ago by jrothra.
    • This reply was modified 7 years, 9 months ago by jrothra. Reason: clarity
    • This reply was modified 7 years, 9 months ago by jrothra.
    Thread Starter jrothra

    (@jrothra)

    Here are screenshots showing what I mean. Remember, Moesia creates bordered boxes around content. However, WooCommerce obliterates them. I want WC to use those boxes.

    JLR’s site: https://goo.gl/qVhCRk
    KAR’s site: https://goo.gl/sWM0vK

    • This reply was modified 7 years, 9 months ago by jrothra. Reason: Provide correct link
    Thread Starter jrothra

    (@jrothra)

    SOLUTION FOUND!

    After lots of research (even trying out other themes, none of which I liked), I found a working solution here: https://docs.woocommerce.com/document/third-party-custom-theme-compatibility/

    What I Did
    Since Moesia uses a loop for creating pages, I couldn’t find a way to use the recommended hook option (see link above). So, I used the catch-all.

    However, I added a div around the loop and added rules in the child theme’s CSS to regulate the design. I used the same parameters used for the full width pages. Here’s the code:

    New woocommerce.php Placed in Child Theme

    get_header(); ?>
    
    	<div id="primary" class="content-area fullwidth">
    		<main id="main" class="site-main" role="main">
    			<div class="wc-storefront">
    				<?php woocommerce_content(); ?>
    			<div>
    		</main><!-- #main -->
    	</div><!-- #primary -->
    
    <?php get_footer(); ?>

    CSS Used in Child Theme style.css

    .wc-storefront {
        border: 4px double #ebebeb;
        padding: 30px;
        background-color: #fff;
    }

    It took a while to discover this, but now that I did, I can’t believe it was so simple!

    • This reply was modified 7 years, 9 months ago by jrothra. Reason: corrected spelling

    Great! Thank you for sharing a solution ??

    Kind Regards, Roman.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘WooCommerce Eliminates Content Boxes – Want them Back’ is closed to new replies.