Advertisement
samikeijonen

Oxygen: Test front page with slider and loop nav

May 23rd, 2012
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.60 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Template Name: Test Front Page
  4.  *
  5.  * Blogroll with slider.
  6.  *
  7.  * @package OxygenChild
  8.  * @subpackage Template
  9.  */
  10.  
  11. get_header(); // Loads the header.php template. ?>
  12.  
  13.     <?php get_template_part( 'featured-content' ); // Loads the featured-content.php template. ?>
  14.    
  15.     <div class="aside">
  16.    
  17.         <?php get_template_part( 'menu', 'secondary' ); // Loads the menu-secondary.php template.  ?>
  18.        
  19.         <?php get_sidebar( 'primary' ); // Loads the sidebar-primary.php template. ?>
  20.    
  21.     </div>
  22.  
  23.     <?php do_atomic( 'before_content' ); // oxygen_before_content ?>
  24.    
  25.     <div class="content-wrap">
  26.  
  27.         <div id="content">     
  28.    
  29.             <?php do_atomic( 'open_content' ); // oxygen_open_content ?>
  30.    
  31.             <div class="hfeed">
  32.                
  33.                 <h4 class="section-title">Recent Articles</h4>
  34.                
  35.                 <?php $args = array( 'post__not_in' => get_option( 'sticky_posts' ), 'posts_per_page' => get_option( 'posts_per_page' ), 'paged' => ( get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1 ) ); ?>
  36.                
  37.                 <?php $wp_query = new WP_Query( $args ); ?>
  38.                
  39.                 <?php if ( $wp_query->have_posts() ) : ?>
  40.                
  41.                     <?php while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>
  42.    
  43.                         <?php do_atomic( 'before_entry' ); // oxygen_before_entry ?>
  44.    
  45.                             <div id="post-<?php the_ID(); ?>" class="<?php hybrid_entry_class(); ?>">
  46.    
  47.                                 <?php do_atomic( 'open_entry' ); // oxygen_open_entry ?>
  48.    
  49.                                 <?php if ( current_theme_supports( 'get-the-image' ) ) get_the_image( array( 'meta_key' => 'Thumbnail', 'size' => 'archive-thumbnail', 'image_class' => 'featured', 'width' => 470, 'height' => 140, 'default_image' => get_template_directory_uri() . '/images/archive-thumbnail-placeholder.gif' ) ); ?>
  50.                                
  51.                                 <div class="entry-header">
  52.                                        
  53.                                     <?php echo apply_atomic_shortcode( 'entry_title', '[entry-title]' ); ?>
  54.                                    
  55.                                     <?php echo apply_atomic_shortcode( 'byline', '<div class="byline">' . __( '[entry-published]', hybrid_get_parent_textdomain() ) . '</div>' ); ?>
  56.                
  57.                                     <?php echo apply_atomic_shortcode( 'byline', '<div class="byline">' . __( 'by [entry-author]', hybrid_get_parent_textdomain() ) . '</div>' ); ?>
  58.                
  59.                                     <?php echo apply_atomic_shortcode( 'byline', '<div class="byline">' . __( '[entry-edit-link]', hybrid_get_parent_textdomain() ) . '</div>' ); ?>
  60.            
  61.                                 </div>
  62.                                
  63.                                 <?php echo apply_atomic_shortcode( 'byline', '<div class="byline-cat">' . __( '[entry-terms taxonomy="category" before=""]', hybrid_get_parent_textdomain() ) . '</div>' ); ?>
  64.                                
  65.                                 <div class="entry-summary">
  66.                                    
  67.                                     <?php the_excerpt(); ?>
  68.                                    
  69.                                     <?php wp_link_pages( array( 'before' => '<p class="page-links">' . __( 'Pages:', hybrid_get_parent_textdomain() ), 'after' => '</p>' ) ); ?>
  70.                                    
  71.                                 </div>
  72.                                    
  73.                                 <a class="read-more" href="<?php the_permalink(); ?>">Read Article</a>
  74.    
  75.                                 <?php do_atomic( 'close_entry' ); // oxygen_close_entry ?>
  76.    
  77.                             </div><!-- .hentry -->
  78.    
  79.                         <?php do_atomic( 'after_entry' ); // oxygen_after_entry ?>
  80.    
  81.                     <?php endwhile; ?>         
  82.    
  83.                 <?php else : ?>
  84.    
  85.                     <?php get_template_part( 'loop-error' ); // Loads the loop-error.php template. ?>
  86.    
  87.                 <?php endif; ?>
  88.            
  89.             </div><!-- .hfeed -->
  90.    
  91.             <?php do_atomic( 'close_content' ); // oxygen_close_content ?>
  92.            
  93.             <?php get_template_part( 'loop-nav' ); // Loads the loop-nav.php template. ?>
  94.            
  95.             <?php wp_reset_postdata(); // Reset Post Data ?>
  96.    
  97.         </div><!-- #content -->
  98.    
  99.         <?php do_atomic( 'after_content' ); // oxygen_after_content ?>
  100.  
  101. <?php get_footer(); // Loads the footer.php template. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement