Advertisement
Digitalraindrops

Wide Header functions.php 2

Jun 6th, 2012
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. // It's a wide layout so make the content wide
  4. if ( ! isset( $content_width ) )
  5.     $content_width = 940;
  6.  
  7. /** Tell WordPress to run post_theme_setup() when the 'after_setup_theme' hook is run. */
  8. add_action( 'after_setup_theme', 'post_theme_setup' );
  9.  
  10. if ( !function_exists( 'post_theme_setup' ) ):
  11. function post_theme_setup() {
  12.  
  13.     // The height and width of your custom header.
  14.     // Add a filter to twentyeleven_header_image_width and twentyeleven_header_image_height to change these values.
  15.     add_filter('twentyeleven_header_image_width', function($size) { return 1140; });
  16.     add_filter('twentyeleven_header_image_height', function($size) { return 150; });
  17.  
  18.     /* 1140 Remove Headers */
  19.     function elevenforty_remove_twenty_eleven_headers(){
  20.         unregister_default_headers( array(
  21.             'wheel',
  22.             'shore',
  23.             'trolley',
  24.             'pine-cone',
  25.             'chessboard',
  26.             'lanterns',
  27.             'willow' ,
  28.             'hanoi')
  29.             );
  30.     }
  31.     add_action( 'after_setup_theme', 'elevenforty_remove_twenty_eleven_headers', 11 );
  32. }
  33. endif;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement