Advertisement
Guest User

header.php

a guest
Sep 26th, 2012
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.47 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html <?php language_attributes(); ?>>
  3. <head>
  4. <meta charset="<?php bloginfo( 'charset' ); ?>" />
  5. <title><?php
  6. global $page, $paged;
  7. wp_title( '|', true, 'right' );
  8. bloginfo( 'name' );
  9. $site_description = get_bloginfo( 'description', 'display' );
  10. if ( $site_description && ( is_home() || is_front_page() ) )
  11. echo " | $site_description";
  12. if ( $paged >= 2 || $page >= 2 )
  13. echo ' | ' . sprintf( __( 'Page %s', 'tie' ), max( $paged, $page ) );
  14. ?></title>
  15. <link rel="profile" href="http://gmpg.org/xfn/11" />
  16. <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
  17.  
  18. <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
  19. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
  20.  
  21. <?php wp_head(); ?>
  22. <link href='http://fonts.googleapis.com/css?family=Droid+Sans:regular,bold' rel='stylesheet' type='text/css'/>
  23.  
  24. </head>
  25. <?php global $is_IE ?>
  26. <body id="top" <?php body_class(); ?>>
  27. <div class="background-cover"></div>
  28. <div class="wrapper">
  29. <header>
  30. <div class="top-nav">
  31. <?php if(tie_get_option( 'top_date' )):
  32. if( tie_get_option('todaydate_format') ) $date_format = tie_get_option('todaydate_format');
  33. else $date_format = 'l , j F Y';
  34. ?>
  35. <span class="today-date"><?php echo date_i18n( $date_format , current_time( 'timestamp' ) ); ?></span><?php endif; ?>
  36.  
  37. <?php wp_nav_menu( array( 'container_class' => 'top-menu', 'theme_location' => 'top-menu', 'fallback_cb' => 'tie_nav_fallback' ) ); ?>
  38. <?php echo tie_alternate_menu( array( 'menu_name' => 'top-menu', 'id' => 'top-menu-mob' ) ) ?>
  39.  
  40.  
  41. <?php if(tie_get_option( 'top_right' ) == 'search'): ?>
  42. <div class="search-block">
  43. <form method="get" id="searchform" action="<?php echo home_url(); ?>/">
  44. <input class="search-button" type="submit" value="<?php if( !$is_IE ) _e( 'Search' , 'tie' ) ?>" />
  45. <input type="text" id="s" name="s" value="<?php _e( 'Search...' , 'tie' ) ?>" onfocus="if (this.value == '<?php _e( 'Search...' , 'tie' ) ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e( 'Search...' , 'tie' ) ?>';}" />
  46. </form>
  47. </div><!-- .search-block /-->
  48. <?php elseif( tie_get_option('top_right') == 'social' ):
  49. tie_get_social( 'yes' , 16 , 'tooldown' ); ?>
  50. <?php endif; ?>
  51.  
  52. </div><!-- .top-menu /-->
  53.  
  54. <div class="header-content">
  55. <?php if( tie_get_option( 'logo_margin' )) $logo_margin = ' style="margin-top:'.tie_get_option( 'logo_margin' ).'px"'; ?>
  56. <div class="logo"<?php echo $logo_margin ?>>
  57. <?php if( tie_get_option('logo_setting') == 'title' ): ?>
  58. <h1 id="site-title"><a href="<?php echo home_url() ?>/"><?php bloginfo('name'); ?></a></h1>
  59. <span><?php bloginfo( 'description' ); ?></span>
  60. <?php else : ?>
  61. <?php if( tie_get_option( 'logo' ) ) $logo = tie_get_option( 'logo' );
  62. else $logo = get_template_directory_uri().'/images/logo.png';
  63. ?>
  64. <h1>
  65. <a title="<?php bloginfo('name'); ?>" href="<?php echo home_url(); ?>/">
  66. <img src="<?php echo $logo ; ?>" alt="<?php bloginfo('name'); ?>" />
  67. </a>
  68. </h1>
  69. <?php endif; ?>
  70. </div><!-- .logo /-->
  71. <?php tie_banner('banner_top' , '<div class="ads-top">' , '</div>' ); ?>
  72. <div class="clear"></div>
  73. </div>
  74.  
  75. <nav id="main-nav">
  76. <?php wp_nav_menu( array( 'container_class' => 'main-menu', 'theme_location' => 'primary' ,'fallback_cb' => 'tie_nav_fallback' ) ); ?>
  77. <?php echo tie_alternate_menu( array( 'menu_name' => 'primary', 'id' => 'main-menu-mob' ) ) ?>
  78. <?php if(tie_get_option( 'random_article' )): ?>
  79. <a href="<?php echo home_url(); ?>/?random" class="random-article ttip" title="<?php _e( 'Random Article' , 'tie' ) ?>"><?php _e( 'Random Article' , 'tie' ) ?></a>
  80. <?php endif ?>
  81. </nav><!-- .main-nav /-->
  82.  
  83. </header><!-- #header /-->
  84.  
  85.  
  86.  
  87. <?php tie_include( 'breaking-news' ); // Get Breaking News template ?>
  88.  
  89. <?php
  90. $sidebar = '';
  91.  
  92. if( tie_get_option( 'sidebar_pos' ) == 'left' ) $sidebar = ' sidebar-left';
  93. if( is_single() || is_page() ){
  94. $get_meta = get_post_custom($post->ID);
  95.  
  96. if( !empty($get_meta["tie_sidebar_pos"][0]) ){
  97. $sidebar_pos = $get_meta["tie_sidebar_pos"][0];
  98.  
  99. if( $sidebar_pos == 'left' ) $sidebar = ' sidebar-left';
  100. elseif( $sidebar_pos == 'full' ) $sidebar = ' full-width';
  101. elseif( $sidebar_pos == 'right' ) $sidebar = ' sidebar-right';
  102. }
  103. }
  104. ?>
  105. <div id="main-content" class="container<?php echo $sidebar ; ?>">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement