Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

Random Background Color Change

Home / Forums / Virtue Theme / Random Background Color Change

This topic is: Resolved
[Resolved]
Posted in: Virtue Theme
February 14, 2018 at 10:36 pm

Okay…so I am trying to change the main content background color to a different random color code each time the page refreshes based on arrays. I have tried tons of different codes in CSS and PHP and JS on various sites and none of them will work. This could be something that I am doing wrong…or maybe the codes just don’t work with wordpress.

I just wanted to make sure this ability is even possible with this theme. Could there be something…anything in the code preventing it from working? Perhaps I need to use a different selector or some sort of override. I am using boxed style and the ‘background-color’ selector is having no effect on content area…sidebar posts or pages…even with normal coding. The background color intheme settings is the only one that shows up.

With the correct selector(s)…I can go through and try out all the codes again…knowing that one of them will probably work!

I barely have my head wrapped around advanced css…so I think the option to have more than one main content background color code in the theme settings would be awesome…because we could choose a subtle palette of five or so complimentary colors that match the site theme and they alternate on page refresh.

  • The forum ‘Virtue Theme’ is closed to new topics and replies.