• On my website I have different sections which I would like to group together visually. Is it possible to have all sub pages and post in say my allotment section to have a green backgound or a different background to the title. I can do this with css but have to add each page seperately. Is there a way to do this with categories?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    You can alter background color of any HTML element by targeting its attributes with custom CSS. The ability to do so with categories depends on whether your theme outputs category class values for appropriate elements. If your theme doesn’t already do so, you could make it so since you’ve created a custom child theme. It’d be a matter of altering the appropriate template files.

    Your theme appears to already distinguishes child pages from parent pages with the body class page-parent, so you could target such pages with something like:
    .page-parent { background-color: lightgreen; }

    Of course, child elements might still maintain their own colors, but those could similarly be targeted. For example:
    .page-parent #wrapper { background-color: lightgreen; }

    Since you’re able to alter theme templates, you can pretty much do whatever you want with layout and colors.

    Thread Starter larissa67

    (@larissa67)

    Thank you that makes sense although I’m nowhere near competent enough to make catagories in my theme. Thank you for the answer though. I’ll ask on the Kadence forum about catagories.

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.