Viewing 6 replies - 1 through 6 (of 6 total)
  • Body apparently has special class, when it is woocommerce page

    body.XXX #secondary, body.XXX #content-sidebar{display:none}

    body.XXX #primary,body.XXX #primary .entry-content {max-width:100%}

    Using Code Snippet you can create conditional CSS.

    Conditional CSS for Woocommerce might look this

    if(is_woocommerce()){
    add_action( ‘wp_head’, function () { ?>
    <style>
    #secondary,#content-sidebar {display:none;}
    #primary .entry-content,#primay,#main-content {max-width:100%;min-width:100%;margin-left:0:margin-right:0}
    </style>
    <?php } );
    }

    I just quess that is_woocommerce() would be the correct function. I really don’t know.

    • This reply was modified 5 years, 7 months ago by tapiohuuhaa.
    Thread Starter marsmmmm

    (@marsmmmm)

    Should I copy the above into additional css in the customize settings of my template?

    if statement is easiest with Code Snippet plugin. Witout PHP into the Custom CSS. Then With custom CSS you must add body.woo-commerce or something else.

    • This reply was modified 5 years, 7 months ago by tapiohuuhaa.
    Thread Starter marsmmmm

    (@marsmmmm)

    I’m not sure what you mean.can you please explain.

    If you want different CSS for woocomerce, you must add
    body.woo-commerce or something like that before each statement. You can look at the source code and look body class=”…”

    With PHP you can limit with if-statements concerning oly woocommerce section.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Full width for woocommerce page only’ is closed to new replies.