Skip Navigation

[Resolved] CPT Template with Avada – background 2 different colors

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to set a consistent background color for my Custom Posts. I currently use Avada and have a Content Template for my CPTs. I have set a background color in Theme Options, but some of my CPTs show with a different background color, defined in the post. I would like to override that setting without needing to update all of my posts manually.

Solution: Use CSS and specificity to create a single style. In this case, the following code can be added to Appearance > Customize > Additional CSS or Avada > Theme Options:

body.single-sports-club #wrapper {
  background: #fff;
}

Relevant Documentation: https://en.wikipedia.org/wiki/Cascading_Style_Sheets

This support ticket is created 7 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by pierreV-2 7 years, 5 months ago.

Assisted by: Christian Cox.

Author
Posts
#521527

I am trying to: get the default background colour standardly used for the CPT Templates, but some are black background, some are (default) white background. How can I get it easily all using the default colour? I use Avada with toolset. I have about 200 items under that CPT, so it's too much changing them all manually.
Where can I change it easily? In Avada, the colour is set to white.
White: hidden link
Black: hidden link

#521588

You can add the following custom CSS, either in Avada Theme Options or in Appearance > Customize > Additional CSS:

body.single-sports-club #wrapper {
background: #fff;
}

This will override the background color settings you have defined for each of these CPT posts.

#521625

Thanks, very helpful, for you probably a piece of cake 😉 but still useful to me.

This ticket is now closed. If you're a Toolset client and need related help, please open a new support ticket.