Advertisement
Guest User

Untitled

a guest
May 9th, 2012
300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.89 KB | None | 0 0
  1. <?php
  2. /**
  3.  * The Header for our theme.
  4.  *
  5.  * Displays all of the <head> section and everything up till <div id="main">
  6.  *
  7.  * @package Reddle
  8.  * @since Reddle 1.0
  9.  */
  10. ?><!DOCTYPE html>
  11. <html <?php language_attributes(); ?>>
  12. <head>
  13. <link rel="stylesheet" type="text/css" media="all" href="/wp-content/themes/reddlec/font/font.css" />
  14. <?php if (is_home() || is_archive() || is_search()) : ?>
  15. <script type="text/javascript">
  16. $(function(){
  17.     $('.carousel').carousel({
  18.       interval: 4000
  19.     });
  20. });
  21. </script>
  22. <?php elseif (is_single()) : ?>
  23. <script type="text/javascript">
  24. $(document).ready(function() {
  25.     $('.gallery-carousel').each(function(){
  26.         $(this).carousel({
  27.             interval: false
  28.         });
  29.     });
  30. });​
  31. </script>
  32. <?php else : ?>
  33.  
  34. <?php endif; ?>
  35. <script src="http://twitter.github.com/bootstrap/assets/js/jquery.js"></script>
  36. <script src="http://twitter.github.com/bootstrap/assets/js/bootstrap-transition.js"></script>
  37. <script src="http://twitter.github.com/bootstrap/assets/js/bootstrap-carousel.js"></script>
  38. <meta charset="<?php bloginfo( 'charset' ); ?>" />
  39. <meta name="viewport" content="width=device-width" />
  40. <title><?php wp_title(''); ?></title>
  41. <link rel="profile" href="http://gmpg.org/xfn/11" />
  42. <?php wp_enqueue_script( 'comment-reply' ); ?>
  43. <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
  44. <!--[if lt IE 9]>
  45. <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
  46. <![endif]-->
  47.  
  48. <?php wp_head(); ?>
  49. <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
  50. <script type="text/javascript">hljs.initHighlightingOnLoad();</script>
  51. </head>
  52.  
  53. <body itemscope itemtype="http://schema.org/Article" <?php body_class(); ?>>
  54. <div id="page" class="hfeed">
  55.     <header id="masthead" role="banner">
  56.  
  57.         <?php if ( has_nav_menu( 'primary' ) ) : ?>
  58.         <nav id="access" role="navigation">
  59.             <h1 class="assistive-text section-heading"><?php _e( 'Main menu', 'reddle' ); ?></h1>
  60.             <div class="skip-link assistive-text"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'reddle' ); ?>"><?php _e( 'Skip to content', 'reddle' ); ?></a></div>
  61.  
  62.             <div id="header">
  63.             <div id="logo">
  64.                 <a href="/" title="What The Nerd!" rel="home">
  65.                     <img src="/wp-content/themes/reddlec/images/logo.gif" width="309px" height="50px" alt="What The Nerd!" />
  66.                 </a>
  67.             </div>
  68.            
  69.             <?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
  70.            
  71.             <div id="top-search-box">
  72.                 <form method="get" id="searchform" action="/" >
  73.                     <input type="text" class="field s" name="s" value="Search..." onfocus="if (this.value == 'Search...') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search...';}" /> <input type="image" src="/wp-content/themes/reddlec/images/search.png" alt="Search" class="submit" name="submit" />
  74.                 </form>
  75.                 <div class="fix"></div>
  76.             </div>
  77.             </div>
  78.  
  79.         </nav><!-- #access -->     
  80.         <div style="clear:both;"></div>
  81.         <?php endif; ?>
  82.  
  83. <?php if (is_home() || is_archive() || is_search()) : ?>
  84. <div id="myCarousel" class="carousel slide">
  85.     <div class="carousel-inner">
  86. <?php
  87.     $count = 0;
  88.     $some_featured_posts = new WP_Query(array('tag' => 'example2', 'posts_per_page' => 4));
  89.     while ($some_featured_posts->have_posts()):
  90.         $some_featured_posts->the_post();
  91.         $count++;
  92. ?>
  93.         <div class="item<?php echo ($count == 1) ? ' active' : ''; ?>">
  94.             <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><img alt="<?php the_title(); ?>" src="<?php echo get_post_meta($post->ID, 'fimage', true); ?>" width="960" height="200" /></a>
  95.         </div>
  96. <?php
  97.     endwhile;
  98.     wp_reset_postdata();
  99. ?>
  100.     </div>
  101.     <a class="carousel-control left" href="#myCarousel" data-slide="prev">&lsaquo;</a>
  102.     <a class="carousel-control right" href="#myCarousel" data-slide="next">&rsaquo;</a>
  103. </div>
  104. <?php else : ?>
  105. <?php endif; ?>
  106.  
  107.     </header><!-- #masthead -->
  108.  
  109.     <div id="main">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement