Advertisement
Guest User

header

a guest
Jul 17th, 2012
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.04 KB | None | 0 0
  1. ?><!DOCTYPE html>
  2. <html <?php language_attributes(); ?>>
  3. <head>
  4. <meta name="author" content="madars bitenieks" />
  5. <meta name="language" content="english" />
  6. <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
  7. <title><?php
  8. global $page, $paged; wp_title( '', true, 'right' ); bloginfo( 'name' ); $site_description = get_bloginfo( 'description', 'display' );
  9. if ( $site_description && ( is_home() || is_front_page() ) )
  10. echo " | $site_description";
  11. ?></title>
  12. <?php wp_head(); ?>
  13. <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
  14. </head>
  15. <body <?php if (is_page_template('contact-page.php') && get_option("of_contact_map")=="true"){ echo 'onload="initialize()"';} ?> <?php body_class(); ?>>
  16.  
  17.  
  18.  
  19. <?php
  20. $title_key="madza_title_type";
  21. $title=get_post_meta($post->ID, $title_key, true);
  22. $custom_key="madza_custom_text";
  23. $custom_text=get_post_meta($post->ID, $custom_key, true);
  24. $title_type_simple="Title only";
  25. $title_type_custom="SubTitle only";
  26. $title_type_simple_custom="Title & SubTitle text";
  27. $title_type_simple_disable="disable";
  28. $key="madza_header_type";
  29. $header=get_post_meta($post->ID, $key, true);
  30. $url="madza_header_url";
  31. $img_url=get_post_meta($post->ID, $url, true);
  32. $image_slider="Nivo Slider";
  33. $image_url="Image from URL";
  34. $anything_slider="Anything Slider";
  35. $beeCodes_slider="beeCodes Slider";
  36.  
  37. if(get_option('slides')) {
  38. $slides = get_option('slides');
  39. } else {
  40. $slides = false;
  41. }
  42. ?>
  43. <div id="texture">
  44.  
  45. <div id="all-div">
  46.  
  47. <!-- ******************** HEAD START ******************** -->
  48.  
  49. <div id="head-layout">
  50.  
  51. <!--TOP AREA -->
  52. <div id="top-area<?php if ( (get_option("of_homepage_slider")=="homepage_beecodes_slider" && is_front_page() && get_option("of_homepage_menu_position")=="true") or
  53. (get_option("of_homepage_slider")=="homepage_nivo_slider" && is_front_page() && get_option("of_homepage_menu_position")=="true") or
  54. $header==$image_slider or
  55. $header==$beeCodes_slider) { echo "-2"; } ?>">
  56.  
  57. <!--TOP HEADER -->
  58. <div id="header">
  59.  
  60. <div id="header-top">
  61.  
  62. <?php if (get_option('of_enable_logo_image')=="true" && get_option("of_logo_image")){?>
  63.  
  64. <div id="logo" <?php if ( get_option('of_logo_image') ) { ?> style="background: no-repeat center left url(<?php { echo get_option('of_logo_image'); } }?>);">
  65.  
  66. <a href="<?php echo home_url();?>"></a>
  67.  
  68. </div><!--END LOGO IMG -->
  69.  
  70. <?php } else {?>
  71.  
  72. <div id="logo"> <h1><a href="<?php echo home_url();?>"><?php echo bloginfo( 'name' ); ?></a></h1> </div><!--END LOGO TEXT -->
  73.  
  74. <?php } ?>
  75.  
  76. <ul id="header-social">
  77.  
  78. <?php if(get_option('of_header_top_phone')!="") {?><li class="phone header-social"><?php echo get_option('of_header_top_phone'); ?></li><?php } ?>
  79. <?php if(get_option('of_header_top_email')!="") {?><li class="email header-social"><?php echo get_option('of_header_top_email'); ?></li><?php } ?>
  80. <?php if(get_option('of_header_top_facebook')!="") {?><li class="facebook header-social"><a href="<?php echo get_option('of_header_top_facebook'); ?>"></a></li><?php } ?>
  81. <?php if(get_option('of_header_top_twitter')!="") {?><li class="twitter header-social"><a href="<?php echo get_option('of_header_top_twitter'); ?>"></a></li><?php } ?>
  82.  
  83.  
  84. </ul>
  85.  
  86. <div class="clear"></div>
  87. </div><!--END HEADER TOP -->
  88.  
  89. <div id="header-menu<?php if ( (get_option("of_homepage_slider")=="homepage_beecodes_slider" && is_front_page() && get_option("of_homepage_menu_position")=="true") or
  90. (get_option("of_homepage_slider")=="homepage_nivo_slider" && is_front_page() && get_option("of_homepage_menu_position")=="true") or
  91. $header==$image_slider or
  92. $header==$beeCodes_slider) { echo "-2"; } ?>">
  93.  
  94. <div id="menu-home-button"><a href="<?php echo home_url(); ?>"></a></div>
  95.  
  96. <div class="nav">
  97.  
  98. <?php wp_nav_menu( array('theme_location' => "header_menu", 'container' =>false, 'menu_class' => 'menu', 'menu_id' => 'menu','echo' => true,'before' => '','after' => '','link_before' => '','link_after' => '','depth' => 0)); ?>
  99.  
  100. </div><!--END MENU -->
  101.  
  102. <?php if(get_option("of_search")=="true" ){ ?>
  103.  
  104. <div id="menu-search">
  105.  
  106. <form method="get" id="searchform" action="<?php echo home_url(); ?>/">
  107.  
  108. <input type="text"
  109. onfocus="if(this.value=='<?php echo __('Search...', 'madza_translate'); ?>')this.value='';"
  110. onblur="if(this.value=='')this.value='<?php echo __('Search...', 'madza_translate'); ?>';"
  111. value="<?php echo __('Search...', 'madza_translate'); ?>"
  112. name="s"
  113. id="menu-search-input"
  114. class="search_input3" />
  115.  
  116.  
  117. <input type="submit" id="menu-search-button" value=""/>
  118.  
  119. </form>
  120.  
  121. </div>
  122.  
  123. <?php } ?>
  124.  
  125. </div><!--END HEADER MENU -->
  126.  
  127.  
  128. <div class="clear"></div>
  129.  
  130. </div><!--END HEADER -->
  131.  
  132. </div><!-- END TOP AREA -->
  133. <?php
  134.  
  135.  
  136.  
  137.  
  138. ####################################################################################################################
  139. # HEADER SLIDER DEFAULT PAGE ---------------------------------------------------------------------------------------
  140. ####################################################################################################################
  141. if ($header==$image_slider or $header==$anything_slider or $header==$beeCodes_slider) {
  142.  
  143. echo '<div id="slider-top-shadow"></div>';
  144.  
  145. if ($header==$image_slider){
  146.  
  147. include (TEMPLATEPATH . '/includes/sliders/nivo-slider.php');
  148.  
  149. echo '<div id="slider-bottom-shadow"></div>';
  150.  
  151. } else if($header==$anything_slider ) {
  152.  
  153. include (TEMPLATEPATH . '/includes/sliders/anything-slider.php');
  154.  
  155. } else if($header==$beeCodes_slider ) {
  156.  
  157. include (TEMPLATEPATH . '/includes/sliders/beeCodes-slider.php');
  158.  
  159. }
  160.  
  161. }
  162.  
  163.  
  164.  
  165.  
  166. ####################################################################################################################
  167. # HEADER SLIDER FRONT PAGE -----------------------------------------------------------------------------------------
  168. ####################################################################################################################
  169. if (is_front_page()){
  170.  
  171. echo '<div id="slider-top-shadow"></div>';
  172.  
  173. if (get_option("of_homepage_slider")=="homepage_nivo_slider"){
  174.  
  175. include (TEMPLATEPATH . '/includes/sliders/nivo-slider.php');
  176.  
  177. echo '<div id="slider-bottom-shadow"></div>';
  178.  
  179. } else if(get_option("of_homepage_slider")=="homepage_anithing_slider") {
  180.  
  181. include (TEMPLATEPATH . '/includes/sliders/anything-slider.php');
  182.  
  183. } else if(get_option("of_homepage_slider")=="homepage_beecodes_slider") {
  184.  
  185. include (TEMPLATEPATH . '/includes/sliders/beeCodes-slider.php');
  186.  
  187. }
  188.  
  189. if ( get_option("of_general_button")=="true" ) { echo '<a href="'. get_option("of_homepage_tagline_first_button_link").'"><div id="general-button"></div></a>'; }
  190.  
  191. }
  192.  
  193.  
  194.  
  195.  
  196. ####################################################################################################################
  197. # HEADER SLIDER OTHER ----------------------------------------------------------------------------------------------
  198. ####################################################################################################################
  199. if(is_page_template('contact-page.php') && get_option("of_contact_map")=="true") { ?>
  200.  
  201. <div id="map_canvas" style="width:960px; margin: 0 auto; height:<?php echo get_option("of_contact_map_height"); ?>px;"></div>
  202.  
  203. <?php } else if($header==$image_url) { ?>
  204.  
  205. <div id="image-from-url" <?php if ($img_url=""){ } else { ?> style="background-image: url(<?php echo get_post_meta($post->ID, $url, true);?>);<?php } ?> height:<?php echo get_option("of_image_from_url_height"); ?>px;"></div>
  206.  
  207. <?php } else if(!(is_front_page())) { ?>
  208.  
  209. <div id="header-midle-line"></div>
  210.  
  211. <?php } ?>
  212.  
  213.  
  214.  
  215.  
  216.  
  217. <!-- ******************** TITLE START ******************** -->
  218.  
  219. <div id="title-layout">
  220.  
  221. <?php if (get_option("of_homepage")=="true" && is_front_page()){ ?>
  222.  
  223. <div class="title-frame-top">
  224.  
  225. <?php if (get_option("of_homepage_tagline")=="true") { ?>
  226.  
  227. <div id="header-title">
  228.  
  229. <div id="title-left-home"><h1><title><?php the_title(); ?></title></h1></div>
  230.  
  231. </div>
  232.  
  233. <?php } ?>
  234.  
  235. </div>
  236.  
  237. <?php } else if (is_page_template('portfolio-full-images.php') OR is_page_template('portfolio-small-images.php')) { ?>
  238.  
  239. <div class="title-frame-top">
  240.  
  241. <div id="header-title">
  242.  
  243. <div id="title-left-portfolio"><h1><?php the_title(); ?></h1></div>
  244.  
  245. <?php $categorys = get_post_meta($post->ID, "madza_portfolio_cat", true);
  246.  
  247. if($categorys=="Select..." OR $categorys=="All" OR $categorys=="" ){ ?>
  248.  
  249. <div id="title-right-portfolio">
  250.  
  251. <?php $term_obj = get_terms('portfolio_taxonomy',$args); ?>
  252.  
  253. <ul id="filter">
  254.  
  255. <li class="current"><a href="#"><?php _e( 'All', "madza_translate" ); ?></a></li>
  256.  
  257. <?php foreach ($term_obj as $term) { ?>
  258.  
  259. <li><a href="#"><?php echo $term->name; ?></a></li>
  260.  
  261. <?php } ?>
  262.  
  263. </ul>
  264.  
  265. </div>
  266.  
  267. <?php } ?>
  268.  
  269. <div class="clear"></div>
  270.  
  271. </div>
  272.  
  273. </div>
  274.  
  275. <?php } else { ?>
  276.  
  277. <div class="title-frame-top">
  278.  
  279. <?php if ($title==$title_type_simple) { ?>
  280.  
  281. <div id="header-title">
  282.  
  283. <div id="title-left"><h1><?php the_title(); ?></h1></div>
  284.  
  285. </div>
  286.  
  287. <?php } else if (get_option("of_homepage")=="false" && is_front_page()){ ?>
  288.  
  289. <div class="title-frame-top">
  290.  
  291. <?php if (get_option("of_homepage_tagline")=="true") { ?>
  292.  
  293. <div id="header-title">
  294.  
  295. <div id="title-left-home"><h1><?php echo get_option("of_homepage_tagline_text"); ?></h1></div>
  296.  
  297. </div>
  298.  
  299. <?php } ?>
  300.  
  301. </div>
  302.  
  303. <?php } else if (is_single("single-portfolio.php")) { ?>
  304.  
  305. <div id="header-title">
  306.  
  307. <div id="title-left"><h1><?php the_title(); ?></h1></div>
  308.  
  309. </div>
  310.  
  311. <?php } else if ($title==$title_type_custom) { ?>
  312.  
  313. <div id="header-title">
  314.  
  315. <div id="header-subtitle"><?php echo get_post_meta($post->ID, $custom_key, true);?></div>
  316.  
  317. <div class="clear"></div>
  318.  
  319. </div>
  320.  
  321. <?php } else if ($title==$title_type_simple_custom) { ?>
  322.  
  323. <div id="header-title">
  324.  
  325. <div id="title-left"><h1><?php the_title(); ?></h1></div>
  326.  
  327. <div id="header-subtitle" ><?php echo get_post_meta($post->ID, $custom_key, true);?></div>
  328.  
  329. <div class="clear"></div>
  330.  
  331. </div>
  332.  
  333. <?php } else if ($title==$title_type_simple_disable) {} else if (is_single()){ ?>
  334.  
  335. <!-- <div id="header-title">
  336.  
  337. <div id="title-left"><h1><?php echo __( 'Blog', "madza_translate" ); ?></h1></div>
  338.  
  339. </div> -->
  340.  
  341. <?php } else if (is_search()){ ?>
  342.  
  343. <div id="header-title">
  344.  
  345. <div id="title-left"><h1><?php printf( __( 'Search Results for: %s', "madza_translate" ), '' . get_search_query() . '' ); ?></h1></div>
  346.  
  347. </div>
  348.  
  349. <?php } else { ?>
  350.  
  351. <div id="header-title">
  352.  
  353. <div id="title-left"><h1><?php the_title(); ?></h1></div>
  354.  
  355. </div>
  356.  
  357. <?php } if ( is_front_page() ) {} else { ?>
  358.  
  359. <div id="title_frame_bottom_objects">
  360.  
  361. <div id="title_left">
  362.  
  363. <?php if ( is_front_page() ) { } else {
  364. if ( get_option('of_breadcrumb')=="true"){
  365.  
  366. if ( function_exists('breadcrumbs_plus')){?>
  367.  
  368. <div id="breadcrumb">
  369.  
  370. <?php breadcrumbs_plus( $args ); ?>
  371.  
  372. <div class="clear"></div>
  373.  
  374. </div><!--END BREADCRUMB -->
  375.  
  376. <?php } } ?><!--END breadcrumb_on -->
  377.  
  378. <?php } ?>
  379.  
  380. </div>
  381.  
  382. <div class="clear"></div>
  383.  
  384. </div>
  385.  
  386. <?php } ?>
  387.  
  388. </div><!--END TITLE FRAME -->
  389.  
  390. <?php } ?>
  391.  
  392. </div>
  393.  
  394. </div><!--END TEXTURE -->
  395.  
  396. <!-- ******************** CONTENT START ******************** -->
  397.  
  398. <div id="content-full">
  399.  
  400. <div id="texture-content">
  401.  
  402. <div id="content">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement