WordPress 3 has brought with it lots of changes and improvements to the already wonderful system we are already familiar with. This lecture will review all the changes and explain the best way to utilize them and when. This is important information for any developer who doesn’t want to be left in the dust as WordPress keeps going forwards.
17. Four constants must be defined define('HEADER_IMAGE', ‘%s/images/default_header.jpg'); define('HEADER_IMAGE_WIDTH', 775); define('HEADER_IMAGE_HEIGHT', 200); define('HEADER_TEXTCOLOR', 'ffffff'); 17
18. If you don't want to allow changing the header text color, add: define('NO_HEADER_TEXT', true ); Then change the first definition to: define('HEADER_TEXTCOLOR', ''); 18
19. Next you need to write two functions add_custom_image_header( ‘header_style’, ‘admin_header_style’ ) 19 http://j.mp/dcuRSv
20. Function 1 // gets included in the site header function header_style() { ?><style type="text/css"> #header { background: url(<?phpheader_image(); ?>); } </style><?php } 20
21. Function 2 // gets included in the admin header function admin_header_style() { ?><style type="text/css"> #headimg { width: <?php echo HEADER_IMAGE_WIDTH; ?>px; height: <?php echo HEADER_IMAGE_HEIGHT; ?>px; } </style><?php } 21
52. This is The Last Slide Thank you for listening! You should look me up on Linkedin, Facebook & Twitter (@orenyomtov) You may soon download this presentation from orenyomtov.com 52
Notes de l'éditeur
Do a live demonstration of changing the header image
Do live demonstration of turning the background black