Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Custom CSS

By: jesin on Sep 11th, 2013  |  syntax: PHP  |  size: 0.32 KB  |  views: 37  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. function my_inline_styles()
  3. {
  4. ?>
  5. <style type="text/css">
  6.  
  7. <?php if(is_front_page()): ?>
  8. #headercontainer {
  9.   background-color: /*Some color here*/;
  10. }
  11. <?php else: ?>
  12. #headercontainer {
  13.   background-color: /*Some other color*/;
  14. }
  15. <?php endif; ?>
  16. </style>
  17. <?php
  18. }
  19.  
  20. add_action("wp_head","my_inline_styles");
  21. ?>