Advertisement
Guest User

Untitled

a guest
Jun 3rd, 2015
333
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.03 KB | None | 0 0
  1. ****************IN FUNCTIONS********************
  2.  
  3. define( 'HEADER_IMAGE', '%s/images/headers/grey.jpg' ); // The default logo located in themes folder
  4. define( 'HEADER_IMAGE_WIDTH', apply_filters( '', 1920 ) ); // Width of Logo
  5. define( 'HEADER_IMAGE_HEIGHT', apply_filters( '', 149 ) ); // Height of Logo
  6. define( 'HEADER_TEXTCOLOR', '333333'); //default text
  7. add_theme_support('custom-header');
  8. function header_style() {
  9. // This function defines the style for the theme
  10. // You can change these selectors to match your theme
  11. ?>
  12. <style type="text/css">
  13. #header{
  14. background: url(<?php header_image() ?>) repeat-x;
  15. }
  16. <?php if ( 'blank' == get_header_textcolor() ) { ?>
  17. #header h2, #header #desc {
  18. }
  19. <?php } else { ?>
  20. #header h2 a, #desc {
  21. color:#<?php header_textcolor() ?>;
  22. }
  23. <?php } ?>
  24. </style>
  25. <?php
  26. }
  27. // Following Code is for Styling the Admin Side
  28. if ( ! function_exists( 'admin_header_style' ) ) :
  29. function admin_header_style() {
  30. ?>
  31. <style type="text/css">
  32. #headimg {
  33. height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
  34. width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
  35. }
  36. #headimg h2{
  37. padding-top:40px;
  38. margin: 0;
  39. }
  40. #headimg h2 a{
  41. color:#<?php header_textcolor() ?>;
  42. text-decoration: none;
  43. border-bottom: none;
  44. }
  45. #headimg #desc{
  46. color:#<?php header_textcolor() ?>;
  47. font-size:1em;
  48. margin-top:-0.5em;
  49. }
  50. <?php if ( 'blank' == get_header_textcolor() ) { ?>
  51. #headimg h2, #headimg #desc {
  52. }
  53. #headimg h2 a, #headimg #desc {
  54. color:#<?php echo HEADER_TEXTCOLOR ?>;
  55. }
  56. <?php } ?>
  57. </style>
  58.  
  59.  
  60. *************IN HEADER***********************
  61.  
  62. <div id="header">
  63. <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="Header Image" />
  64. </div>
  65.  
  66. *************IN CSS************************
  67.  
  68. #header {
  69. background: rgba(0, 0, 0, 0) url("http://playfulsstudio.com/wp-content/uploads/2015/05/cropped-playful-logo.jpg") repeat-x scroll 0 0;
  70. margin: 0 auto;
  71. height: 149px;
  72. max-width: 1920px;
  73. min-width: 960px;
  74.  
  75. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement