Advertisement
Guest User

custom

a guest
Jun 12th, 2013
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.65 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Template Name: Custom Homepage
  4.  */
  5. get_header(); ?>
  6.     <div id="primary" class="content-area">
  7.         <div id="content" class="site-content" role="main">
  8.  
  9.             <div id="highlight-posts" class="flexslider">
  10.  
  11.                 <ul class="slides clearfix">
  12.  
  13.                     <?php $highlight_query = new WP_Query( array(
  14.                         'post_type' => 'post',
  15.                         'posts_per_page' => 3
  16.                     ) ); ?>
  17.  
  18.                     <?php /* Start the Loop */ ?>
  19.                     <?php while ( $highlight_query->have_posts() ) : $highlight_query->the_post(); ?>
  20.                     <li>
  21.                         <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  22.  
  23.                             <?php if ( has_post_thumbnail() ) : ?>
  24.                             <div class="post-media">
  25.                                 <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_post_thumbnail( 'thumb-slider' ); ?></a>
  26.                             </div><!-- end .post-media -->
  27.                             <?php endif; ?>
  28.  
  29.                             <div class="slide-post-content">
  30.                                 <div class="slide-post-inside">
  31.  
  32.                                     <h1 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
  33.                                     <?php the_excerpt(); ?>
  34.                                     <div class="entry-meta">
  35.                                         <?php the_time( 'j F Y' ); ?>
  36.                                     </div><!-- .entry-meta -->
  37.                                
  38.                                 </div><!-- end .slide-post-inside -->
  39.                             </div><!-- end .slide-post-content -->
  40.  
  41.                         </div><!-- end .post -->
  42.                     </li>
  43.  
  44.                     <?php endwhile; wp_reset_postdata(); ?>
  45.  
  46.                 </ul><!-- end .slides .clearfix -->
  47.  
  48.             </div><!-- end #highlight-posts -->
  49.  
  50.             <div class="page-header">
  51.                 <h1 class="page-title">Gossip</h1>
  52.             </div><!-- end .page-header -->
  53.  
  54.             <?php $main_query = new WP_Query( array(
  55.                 'post_type' => 'post',
  56.                 'offset' => 3,
  57.                 'posts_per_page' => 3
  58.             ) ); ?>
  59.  
  60.  
  61.  
  62.             <?php /* Start the Loop */ ?>
  63.             <?php while ( $main_query->have_posts() ) : $main_query->the_post(); ?>
  64.  
  65.                 <?php
  66.                     global $more;
  67.                     $more = 0;
  68.                 ?>
  69.  
  70.                 <?php
  71.                     /* Include the Post-Format-specific template for the content.
  72.                      * If you want to overload this in a child theme then include a file
  73.                      * called content-___.php (where ___ is the Post Format name) and that will be used instead.
  74.                      */
  75.                     get_template_part( 'content', get_post_format() );
  76.                 ?>
  77.  
  78.             <?php endwhile; wp_reset_postdata(); ?>
  79.  
  80.             <div id="home-widget-areas" class="clearfix">
  81.  
  82.                 <div class="home-widgets">
  83.                     <?php dynamic_sidebar( 'home-sidebar-1' ); ?>
  84.                 </div><!-- end .home-widgets -->
  85.  
  86.                 <div class="home-widgets">
  87.                     <?php dynamic_sidebar( 'home-sidebar-2' ); ?>
  88.                 </div><!-- end .home-widgets -->
  89.  
  90.             </div><!-- end #home-widget-areas -->
  91.  
  92.         </div><!-- #content -->
  93.     </div><!-- #primary -->
  94.  
  95. <?php get_sidebar(); ?>
  96. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement