4

I wanna change my CSS for a specific page, and I can not get the ID of that page. I wonder how I can change my CSS for a specific page when I don't have a ID of that page? This is the ID of my page: forum=forum-framtidsjouren

If I change the code below I'm changing other pages too...

.home #content, .single #content, .page #content 
{
background: none repeat scroll 0 0 transparent;
box-shadow: none;
width: 100% !important; // I want to change width to 100% !important
}
2
  • 5
    Open up the inspector in your browser and navigate to the body tag and you will see something like this: <body class="... postid-123 / page-id-123 ..."> Commented Sep 12, 2013 at 11:25
  • @biziclop, consider moving this to an answer. Commented Sep 12, 2013 at 12:07

2 Answers 2

5

Open up the inspector in your browser and navigate to the <body> tag and you will see something like this:

<body class="... postid-123 ...">
  or
<body class="... page-id-123 ...">

See the documentation of the body_class() function in WordPress, which is responsible for generating these classes:

http://codex.wordpress.org/Function_Reference/body_class

Sign up to request clarification or add additional context in comments.

Comments

-2

You could also use a plugin which allows you to load specific css files for some specific pages.

This one for instance: https://wordpress.org/plugins/this-page-needs-files/

1 Comment

I'd consider that solution pretty heavy-weight and needlessly prone to side effects for the given question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.