wordpress Q
wordpress Q
Out of context: Reply #10
- Started
- Last post
- 11 Responses
- melq0
acescence has it exactly right.
What I will do is find out if the page has a parent. If so, then set a variable to the parent's value. If not, I set the variable to it's own value.
Then I use it to set a class, which is styled by the CSS.
In this example I also give the <body> tag an ID based on the post name:
http://pastebin.com/JtduEa3e