Support » Fixing WordPress » Setting a different appearance for page and subpages (how to?)

  • Hi, I bet this question has been asked a million times but I’m very new to website design and only installed WP for the first time a few days ago.

    Basically I’ve set up a complete custom CSS for my site based in a child theme. What I want is for a page and all subsequent subpages of it to have the same appearance but in a different colour scheme. Is there a simple way to achieve this please?

    Any and all help appreciated but please remember I am new to this and am only just experimenting so try to keep the jargon to a minimum if you wouldn’t mind 🙂



Viewing 1 replies (of 1 total)
  • Moderator keesiemeijer



    Try it by incorporating the body_class in your theme:

    This will add classes like this on child pages:
    <body class="page page-id-1481 page-parent page-child parent-pageid-37 page-template-default logged-in admin-bar no-customize-support custom-font-enabled">

    Style child pages of a parent page (with an id of 37) like this example: #content {
    color: red;

Viewing 1 replies (of 1 total)
  • The topic ‘Setting a different appearance for page and subpages (how to?)’ is closed to new replies.