Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Dec 13th, 2011  |  syntax: PHP  |  size: 0.81 KB  |  hits: 45  |  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. define('HEADER_TEXTCOLOR', 'ffffff');
  2. define('HEADER_IMAGE', '%s/images/featuredContact.jpg'); // %s is the template dir uri
  3. define('HEADER_IMAGE_WIDTH', 980); // use width and height appropriate for your theme
  4. define('HEADER_IMAGE_HEIGHT', 200);
  5.  
  6. // gets included in the site header
  7. function header_style() {
  8.     ?><style type="text/css">
  9.         #header {
  10.             background: url(<?php header_image(); ?>);
  11.         }
  12.     </style><?php
  13. }
  14.  
  15. // gets included in the admin header
  16. function admin_header_style() {
  17.     ?><style type="text/css">
  18.         #heading {
  19.             width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
  20.             height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
  21.             background: no-repeat;
  22.         }
  23.     </style><?php
  24. }
  25.  
  26. add_custom_image_header('header_style', 'admin_header_style');
  27.  
  28.