Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1264379

    Hello,

    I’ve a dark background site and want to switch the styling of the checkout and cart page to “alternate” instead of “main”, so that the woocommerce modules are on white background.

    What’s the best way?

    Thank you.
    Silvia

    p.s. You’re theme is great news!

    #1264649

    Hey Silvia,

    Please post a link to where we can see the element you want to change, and let us know which colour you would like to use instead.

    Best regards,
    Rikard

    #1264832

    Hi Rikard!

    I’d like to change everything actually, as from the alternate content in the theme options (background, font color, borders, etc).
    Here’s the links.

    #1265406

    Hi,

    Thank you for the update.

    Try to edit the page.php file and adjust the class name of the container_wrap from main_color to alternate_color. The container_wrap can be found around line 22 of the page template file.

    
    <div class='container_wrap container_wrap_first main_color <?php avia_layout_class( 'main' ); ?>'>
    

    Please note that this modification will affect all pages that is using the template.

    Best regards,
    Ismael

    #1265547

    Hi,

    thank you for your answer.
    If I change the page.php then it will affect all the other pages too, correct?
    I need the other pages to remain with the main theme (black), is there a way to change the layout of the cart and checkout pages only?

    #1265973

    Hi,

    We can add a conditional function to the template file so that it only sets the palette to alternate_color when viewing the checkout page. Try to replace the snippet with this.

    
    <?php  $palette = is_page(array(18)) ? 'alternate_color' : 'main_color'; ?>
    <div class='container_wrap container_wrap_first <?php echo $palette . ' '; avia_layout_class( 'main' ); ?>'>
    

    Adjust the value inside the conditional function is_page to the actual ID of the checkout page.

    Best regards,
    Ismael

    #1265996

    Hi Ismael,

    thank you very much!
    Where exactly should I replace the snippet?

    Have a nice day,
    Silvia

    #1266179

    Hi,

    You have to replace the value of the is_page function with the actual ID of the checkout page.

    is_page(array(18))
    

    Replace 18 with the ID or name of the checkout page which is 436.

    is_page(array(436))
    

    Thank you for your patience.

    Best regards,
    Ismael

    #1266254

    Thank you very much, it worked!!!
    Great work, as always.

    Have a wonderful day!

    Silvia

    #1266356

    Hi Silvia33,

    Glad we could help :)

    If you need further assistance please let us know.
    Best regards,
    Victoria

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.