• I’m trying to style a page and I’m using the page ID but it’s not working. This is the page ID.

    ?page_id=1997&preview=true

    This is my CSS. What am I missing?

    .page_id-1997 { background-color: #000000 !important; }

    FYI: I don’t see the page ID via Firebug – not sure why.

    Thanks!

Viewing 1 replies (of 1 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Look at the <body> statement in your HTML. That’s where the page-id class is applied.

    For example, from one of the pages on my test site:

    <body class="page-template-default page page-id-1725 page-parent logged-in admin-bar no-customize-support wp-embed-responsive singular image-filters-enabled">

    Also note that it’s “page-id”, not “page_id”.

Viewing 1 replies (of 1 total)
  • The topic ‘Style Page Using Page ID’ is closed to new replies.