WordPress wizards: best way to modify css based on page we’re on?
-
my goal is to have a slightly different look for the home page and other top-level pages (i.e. ‘about us’)
currently im changing the css simply by inserting an inline style for each page respectively.
from what i understand reading the forums here it looks like the best way is to use the functions.php to detect this and swap accordingly?
If so I’m afraid my function isn’t working, nor is it ideal as it seems to me this would be simply injecting the same inline styles as before, but i’d really rather keep my markup clean – how to do this?:
<?php if (is_home()) { <style type="text/css">#banner2 { background-color: #CCC; }</style> } else { <style type="text/css">#banner2 { background-color: #AAA }</style> } ?>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘WordPress wizards: best way to modify css based on page we’re on?’ is closed to new replies.