Guest User

header.php

a guest
Jan 23rd, 2011
449
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. global $custom_settings;
  3. /* Allow the overriding of custom settings array on a per post/page basis using custom fields: */
  4. if(is_single() || is_page()) { $post_or_page_id = $post->ID; }
  5. $data = get_post_meta($post_or_page_id, "custom_meta_values", true);
  6. if($data["hide_thumbnail_on_single"])
  7. $custom_settings["layout"]["hide_thumbnail_on_single"] = $data["hide_thumbnail_on_single"];
  8. if($data["columns"])
  9. $custom_settings["layout"]["columns"] = $data["columns"];
  10. /* ------------------------------------------------------------------------------------------- */
  11. ?>
  12. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  13. <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
  14. <head profile="http://gmpg.org/xfn/11">
  15. <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
  16. <title><?php wp_title(' - ', true, 'right'); ?> <?php bloginfo('name'); ?></title>
  17. <?php add_action('wp_head', 'add_stylesheets'); ?>
  18. <?php //add_action('wp_head', 'add_javascript'); ?>
  19.  
  20. <?php
  21. // Cufon fonts - use ColaborateLight_400 as default if no other font selected.
  22. $font = "ColaborateLight_400.font.js"; // default
  23. if($custom_settings["font"]){ $font = $custom_settings["font"]; }
  24. echo "<!--[if lt IE 8]><script src='http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE8.js' type='text/javascript'></script><![endif]-->";
  25. wp_enqueue_script('jquery'); // load new jquery
  26. wp_enqueue_script('cudazi_cufon',get_bloginfo('template_directory')."/js/cufon-yui.js");
  27. wp_enqueue_script('cudazi_fonts',get_bloginfo('template_directory')."/js/fonts/".$font);
  28. wp_enqueue_script('cudazi_superfish',get_bloginfo('template_directory')."/js/superfish.js");
  29. wp_enqueue_script('cudazi_supersubs',get_bloginfo('template_directory')."/js/supersubs.js");
  30. wp_enqueue_script('cudazi_cycle',get_bloginfo('template_directory')."/js/jquery.cycle.min.js");
  31. wp_enqueue_script('cudazi_general',get_bloginfo('template_directory')."/js/general.js");
  32. echo html_entity_decode($custom_settings["additional_js"], ENT_QUOTES);
  33. ?>
  34.  
  35. <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
  36. <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
  37. <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
  38. <?php wp_head(); ?>
  39. </head>
  40. <body <?php body_class(); ?>>
  41. <div id="outer">
  42. <div id="main">
  43. <div class="container_12 clearfix">
  44. <div id="header" class="clearfix">
  45. <div class="grid_8">
  46. <div class="logo">
  47. <?php if($custom_settings["logo_text_based"]){ ?>
  48. <h1><a href="<?php bloginfo("url"); ?>"><?php echo $custom_settings["logo_text_based"]; ?></a></h1>
  49. <?php }else{ ?>
  50. <a href="<?php bloginfo("url"); ?>"><img src="<?php if($custom_settings["logo"]) { echo $custom_settings["logo"]; }else{ echo get_bloginfo('template_directory') . "/images/logo.gif"; } ?>" alt="Logo" /></a>
  51. <?php } ?>
  52. </div><!--//logo-->
  53. </div><!--//grid2-->
  54. <div class="grid_4">
  55. <?php if($custom_settings["search_disabled"]) { echo "<!-- search disabled-->"; }else{ ?>
  56. <div class="toolbox-horizontal right">
  57. <div id="searchform">
  58. <form action="<?php bloginfo("url"); ?>/" method="get" class="clearfix">
  59. <input type="image" src="<?php bloginfo('template_directory'); ?>/images/search_icon.gif" value="Search" id="searchbutton" class="right" />
  60. <input type="text" value="Search Our Site" name="s" id="s" />
  61. </form>
  62. </div>
  63. </div><!--//toolbox-->
  64. <?php } ?>
  65. </div><!--//grid_10-->
  66. <div class="grid_12">
  67.  
  68. <?php wp_nav_menu(
  69. array(
  70. 'container' => 'div',
  71. 'container_class' => 'menu-horizontal clearfix',
  72. 'menu_class' => 'sf-menu',
  73. 'theme_location' => 'primary',
  74. 'fallback_cb' => 'cudazi_fallback_menu' )
  75. ); ?>
  76. <?php function cudazi_fallback_menu() { /* backup menu if 3.0 menu is not in use */ ?>
  77. <div class="menu-horizontal clearfix">
  78. <ul class="sf-menu">
  79. <?php if($custom_settings["dropdown_disabled"]) { $depth = 1; } ?>
  80. <?php $exclude = $custom_settings["menu_exclude"]; ?>
  81. <?php wp_list_pages("title_li=&exclude=".$exclude."&depth=".$depth); ?>
  82. </ul>
  83. </div><!--// menu-horizontal-->
  84. <?php } ?>
  85.  
  86. </div><!-- // grid_12-->
  87. </div><!--//header-->
RAW Paste Data