Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * The Header for our theme.
- *
- * Displays all of the <head> section and everything up till <div id="main">
- *
- * @package Reddle
- * @since Reddle 1.0
- */
- ?><!DOCTYPE html>
- <html <?php language_attributes(); ?>>
- <head>
- <link rel="stylesheet" type="text/css" media="all" href="/wp-content/themes/reddlec/font/font.css" />
- <?php if (is_home() || is_archive() || is_search()) : ?>
- <script type="text/javascript">
- $(function(){
- $('.carousel').carousel({
- interval: 4000
- });
- });
- </script>
- <?php elseif (is_single()) : ?>
- <script type="text/javascript">
- $(document).ready(function() {
- $('.gallery-carousel').each(function(){
- $(this).carousel({
- interval: false
- });
- });
- });
- </script>
- <?php else : ?>
- <?php endif; ?>
- <script src="http://twitter.github.com/bootstrap/assets/js/jquery.js"></script>
- <script src="http://twitter.github.com/bootstrap/assets/js/bootstrap-transition.js"></script>
- <script src="http://twitter.github.com/bootstrap/assets/js/bootstrap-carousel.js"></script>
- <meta charset="<?php bloginfo( 'charset' ); ?>" />
- <meta name="viewport" content="width=device-width" />
- <title><?php wp_title(''); ?></title>
- <link rel="profile" href="http://gmpg.org/xfn/11" />
- <?php wp_enqueue_script( 'comment-reply' ); ?>
- <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
- <!--[if lt IE 9]>
- <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
- <![endif]-->
- <?php wp_head(); ?>
- <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
- <script type="text/javascript">hljs.initHighlightingOnLoad();</script>
- </head>
- <body itemscope itemtype="http://schema.org/Article" <?php body_class(); ?>>
- <div id="page" class="hfeed">
- <header id="masthead" role="banner">
- <?php if ( has_nav_menu( 'primary' ) ) : ?>
- <nav id="access" role="navigation">
- <h1 class="assistive-text section-heading"><?php _e( 'Main menu', 'reddle' ); ?></h1>
- <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>
- <div id="header">
- <div id="logo">
- <a href="/" title="What The Nerd!" rel="home">
- <img src="/wp-content/themes/reddlec/images/logo.gif" width="309px" height="50px" alt="What The Nerd!" />
- </a>
- </div>
- <?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
- <div id="top-search-box">
- <form method="get" id="searchform" action="/" >
- <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" />
- </form>
- <div class="fix"></div>
- </div>
- </div>
- </nav><!-- #access -->
- <div style="clear:both;"></div>
- <?php endif; ?>
- <?php if (is_home() || is_archive() || is_search()) : ?>
- <div id="myCarousel" class="carousel slide">
- <div class="carousel-inner">
- <?php
- $count = 0;
- $some_featured_posts = new WP_Query(array('tag' => 'example2', 'posts_per_page' => 4));
- while ($some_featured_posts->have_posts()):
- $some_featured_posts->the_post();
- $count++;
- ?>
- <div class="item<?php echo ($count == 1) ? ' active' : ''; ?>">
- <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>
- </div>
- <?php
- endwhile;
- wp_reset_postdata();
- ?>
- </div>
- <a class="carousel-control left" href="#myCarousel" data-slide="prev">‹</a>
- <a class="carousel-control right" href="#myCarousel" data-slide="next">›</a>
- </div>
- <?php else : ?>
- <?php endif; ?>
- </header><!-- #masthead -->
- <div id="main">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement