Advertisement
Guest User

index.php

a guest
Feb 16th, 2013
302
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.78 KB | None | 0 0
  1. <?php
  2. /**
  3.  * The main template file.
  4.  *
  5.  * This is the most generic template file in a WordPress theme
  6.  * and one of the two required files for a theme (the other being style.css).
  7.  * It is used to display a page when nothing more specific matches a query.
  8.  * E.g., it puts together the home page when no home.php file exists.
  9.  * Learn more: http://codex.wordpress.org/Template_Hierarchy
  10.  *
  11.  * @package Twenty Twelve
  12.  * @since Twenty Twelve 1.0
  13.  */
  14.  
  15. get_header(); ?>
  16.  
  17.         <div id="primary" class="content-area">
  18.             <section id="content" class="site-content" role="main">
  19.                 <?php if ( have_posts() ) : ?>
  20.                     <?php //twentytwelve_content_nav( 'nav-above' ); ?>
  21.                     <?php /* Start the Loop */ ?>
  22.                     <?php while ( have_posts() ) : the_post(); ?>
  23.                         <article id="post-<?php the_ID(); ?>" <?php post_class('clearfix content-articles'); ?>>
  24.                             <a class="archives-thumb-link" href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_post_thumbnail( 'archives-thumb' ); ?></a>
  25.  
  26.                             <div class="entry-text-wrapper">
  27.                                 <header class="entry-header">
  28.                                     <h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
  29.                                 </header><!-- .entry-header -->
  30.                             </div>
  31.                         </article><!-- #post-<?php the_ID(); ?> -->
  32.                     <?php endwhile; ?>
  33.                     <?php twentytwelve_content_nav( 'nav-below' ); ?>
  34.                 <?php else : ?>
  35.                     <?php get_template_part( 'no-results', 'index' ); ?>
  36.                 <?php endif; ?>
  37.             </section><!-- #content .site-content -->
  38.  
  39.             <section id="highlights-container" class="site-content">
  40.                 <?php $latest_highlights = new WP_Query('tag=highlights&showposts=20&paged=' . $paged); ?>
  41.                 <?php if ( $latest_highlights->have_posts() ) : ?>
  42.                     <?php while ($latest_highlights->have_posts()) : $latest_highlights->the_post(); $the_highlights_counter++; ?>
  43.                         <article id="highlights-<?php echo $the_highlights_counter; ?>" class="highlights-wrapper">
  44.                             <a class="highlights-link" href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark">
  45.                                 <?php the_post_thumbnail( 'highlights-thumb' ); ?>
  46.                                 <h1 class="highlights-title"><?php the_title(); ?> <span>/ <?php echo the_time('M. n'); ?></span></h1>
  47.                             </a>
  48.                         </article>
  49.                     <?php endwhile; ?>
  50.                 <?php else : ?>
  51.                     <?php get_template_part( 'no-results', 'index' ); ?>
  52.                 <?php endif; ?>
  53.             </section><!-- #content .site-content -->
  54.         </div><!-- #primary .content-area -->
  55.  
  56. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement