Viewing 3 replies - 1 through 3 (of 3 total)
  • Dos your theme use the body_class function? If so, you can use CSS to target your CSS changes at a specific page using the classes generated on the <body> tag.

    Thread Starter connepon1985

    (@connepon1985)

    Hi Esmi, thanks for your reply.

    I’m not really sure how to use the body class function. I have the following code, but then the CSS does not only apply to the parent page, but also the subpages and that’s not what I want.

    <body<?php if ( is_page(‘store’)) {
    echo ‘ class=”myclass” ‘; } ?>>

    Do you, or anyone else, how to change the code so it only applies to one URL and not the subpages?

    Thread Starter connepon1985

    (@connepon1985)

    never mind; I’ve changed the lay-out

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

The topic ‘Change css single page (only parent)’ is closed to new replies.