Advertisement
herewemakebelieve

Cassie's functions.php

May 28th, 2013
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. // CHANGE DEFAULT THUMBNAIL SIZE
  5. function twentytwelve_setup() {
  6. set_post_thumbnail_size( 700, 9999 ); // Unlimited height, soft crop
  7. }
  8. add_action( 'after_setup_theme', '_twentytwelve_setup', 11 );
  9.  
  10.  
  11.  
  12. //Override content width (for photo and video embeds)
  13. $content_width = 700;
  14.  
  15. function twentytwelve_content_width() {
  16. if ( is_page_template( 'page-templates/full-width.php' ) || is_attachment() || ! is_active_sidebar( 'sidebar-1' ) ) {
  17. global $content_width;
  18. $content_width = 1090;
  19. }
  20. }
  21.  
  22. add_action( 'template_redirect', 'twentytwelve_content_width', 11 );
  23.  
  24.  
  25. function twentytwelve_custom_header_setup() {
  26. $header_args = array(
  27. 'width' => 1090,
  28. 'height' => 250
  29. );
  30. add_theme_support( 'custom-header', $header_args );
  31. }
  32. add_action( 'after_setup_theme', 'twentytwelve_custom_header_setup' );
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement