vanyab
asked on
Applying independent stylesheets to individual wordpress pages
I need a way to independently style a singular page within a wordpress site without affecting the other pages.
methods?
methods?
Copy your theme template to a new name, modify this and apply it to the page.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Simple. Thank you.
Styling a page differently is easy. Tom's instructions above are how to create a new page template and you can then alter the structure of the page. However, different styles can easily be achieved because WordPress adds the postID to the top-level classes on pages and posts automatically and you can use that to create custom styles in the main stylesheet. The Codex reference for this is here:
http://codex.wordpress.org/Function_Reference/body_class#Examples
That page contains an exhaustive description of the process as well as CSS samples. Short version, you do something like:
Where "2" is the ID of the page or post you want to customize.
http://codex.wordpress.org/Function_Reference/body_class#Examples
That page contains an exhaustive description of the process as well as CSS samples. Short version, you do something like:
.page-id-2 {
/* styles for only page ID number 2 */
}
Where "2" is the ID of the page or post you want to customize.
My pleasure :-)