SHARE
TWEET

Untitled

a guest Dec 13th, 2011 49 Never
  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.  
RAW Paste Data
Top