-
AuthorPosts
-
December 2, 2020 at 5:15 am #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.
Silviap.s. You’re theme is great news!
December 3, 2020 at 5:17 am #1264649Hey 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,
RikardDecember 3, 2020 at 7:00 pm #1264832Hi 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.December 7, 2020 at 8:23 am #1265406Hi,
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,
IsmaelDecember 7, 2020 at 6:20 pm #1265547Hi,
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?December 9, 2020 at 12:43 pm #1265973Hi,
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,
IsmaelDecember 9, 2020 at 1:59 pm #1265996Hi Ismael,
thank you very much!
Where exactly should I replace the snippet?Have a nice day,
SilviaDecember 10, 2020 at 6:23 am #1266179Hi,
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,
IsmaelDecember 10, 2020 at 11:49 am #1266254Thank you very much, it worked!!!
Great work, as always.Have a wonderful day!
Silvia
December 10, 2020 at 7:06 pm #1266356Hi Silvia33,
Glad we could help :)
If you need further assistance please let us know.
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.