Archived topic
Change Slider colors
1 reply · Started by Matthias on April 5, 2022
Hi there,
i searches for some time to find a slider/swiper that works well with generatepress + generateblocks.
So far i decided to use wp swiper - which is easy to use and so far seems to work great with generatepress/blocks.
One thing missing is taking color settings from the theme.
So the navigation for a slider and e.g. the bullets have different colors.
Do you know how to let a slider take the colors of the template or a custom color?
Hi there,
the plugin has its own color variables. It uses this one: --swiper-navigation-color for the navigation element.
You can use this CSS to change it:
.wp-swiper {
--swiper-navigation-color: #ff0000;
}
And you could take it one step further and load that variable with a GP Global Color variable.
I can see you have a few global colors, lets take this one: --main-01 for example and use this CSS:
.wp-swiper {
--swiper-navigation-color: var(--main-01);
}