Advertisement
grappler

home-page.php using static content

Sep 20th, 2012
3,465
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.37 KB | None | 0 0
  1. <?php
  2.  
  3. // Exit if accessed directly
  4. if ( !defined('ABSPATH')) exit;
  5.  
  6. /**
  7.  * Home Page Template
  8.  *
  9.    Template Name:  Home Page (w/ home widgets)
  10.  *
  11.  * @file           home-page.php
  12.  * @package        Responsive
  13.  * @author         Emil Uzelac
  14.  * @copyright      2003 - 2011 ThemeID
  15.  * @license        license.txt
  16.  * @version        Release: 1.0
  17.  * @filesource     wp-content/themes/responsive/full-width-page.php
  18.  * @link           http://codex.wordpress.org/Theme_Development#Pages_.28page.php.29
  19.  * @since          available since Release 1.0
  20.  */
  21. ?>
  22. <?php get_header(); ?>
  23.  
  24.         <div id="content-full" class="grid col-940">
  25.        
  26. <?php if (have_posts()) : ?>
  27.  
  28.         <?php while (have_posts()) : the_post(); ?>
  29.        
  30.         <?php $options = get_option('responsive_theme_options'); ?>
  31.         <?php if ($options['breadcrumb'] == 0): ?>
  32.         <?php echo responsive_breadcrumb_lists(); ?>
  33.         <?php endif; ?>
  34.        
  35.             <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  36.                 <h1 class="post-title"><?php the_title(); ?></h1>
  37.  
  38.                 <?php if ( comments_open() ) : ?>              
  39.                 <div class="post-meta">
  40.                 <?php
  41.                     printf( __( '<span class="%1$s">Posted on</span> %2$s by %3$s', 'responsive' ),'meta-prep meta-prep-author',
  42.                     sprintf( '<a href="%1$s" title="%2$s" rel="bookmark">%3$s</a>',
  43.                         get_permalink(),
  44.                         esc_attr( get_the_time() ),
  45.                         get_the_date()
  46.                     ),
  47.                     sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>',
  48.                         get_author_posts_url( get_the_author_meta( 'ID' ) ),
  49.                     sprintf( esc_attr__( 'View all posts by %s', 'responsive' ), get_the_author() ),
  50.                         get_the_author()
  51.                         )
  52.                     );
  53.                 ?>
  54.                     <?php if ( comments_open() ) : ?>
  55.                         <span class="comments-link">
  56.                         <span class="mdash">&mdash;</span>
  57.                     <?php comments_popup_link(__('No Comments &darr;', 'responsive'), __('1 Comment &darr;', 'responsive'), __('% Comments &darr;', 'responsive')); ?>
  58.                         </span>
  59.                     <?php endif; ?>
  60.                 </div><!-- end of .post-meta -->
  61.                 <?php endif; ?>
  62.                
  63.                 <div class="post-entry">
  64.                     <?php the_content(__('Read more &#8250;', 'responsive')); ?>
  65.                     <?php wp_link_pages(array('before' => '<div class="pagination">' . __('Pages:', 'responsive'), 'after' => '</div>')); ?>
  66.                 </div><!-- end of .post-entry -->
  67.                
  68.                 <?php if ( comments_open() ) : ?>
  69.                 <div class="post-data">
  70.                     <?php the_tags(__('Tagged with:', 'responsive') . ' ', ', ', '<br />'); ?>
  71.                     <?php the_category(__('Posted in %s', 'responsive') . ', '); ?>
  72.                 </div><!-- end of .post-data -->
  73.                 <?php endif; ?>            
  74.            
  75.             <div class="post-edit"><?php edit_post_link(__('Edit', 'responsive')); ?></div>
  76.             </div><!-- end of #post-<?php the_ID(); ?> -->
  77.            
  78.             <?php comments_template( '', true ); ?>
  79.            
  80.         <?php endwhile; ?>
  81.        
  82.         <?php if (  $wp_query->max_num_pages > 1 ) : ?>
  83.         <div class="navigation">
  84.             <div class="previous"><?php next_posts_link( __( '&#8249; Older posts', 'responsive' ) ); ?></div>
  85.             <div class="next"><?php previous_posts_link( __( 'Newer posts &#8250;', 'responsive' ) ); ?></div>
  86.         </div><!-- end of .navigation -->
  87.         <?php endif; ?>
  88.  
  89.         <?php else : ?>
  90.  
  91.         <h1 class="title-404"><?php _e('404 &#8212; Fancy meeting you here!', 'responsive'); ?></h1>
  92.         <p><?php _e('Don&#39;t panic, we&#39;ll get through this together. Let&#39;s explore our options here.', 'responsive'); ?></p>
  93.         <h6><?php _e( 'You can return', 'responsive' ); ?> <a href="<?php echo home_url(); ?>/" title="<?php esc_attr_e( 'Home', 'responsive' ); ?>"><?php _e( '&larr; Home', 'responsive' ); ?></a> <?php _e( 'or search for the page you were looking for', 'responsive' ); ?></h6>
  94.         <?php get_search_form(); ?>
  95.  
  96. <?php endif; ?>  
  97.      
  98.         </div><!-- end of #content-full -->
  99. <?php get_sidebar('home'); ?>
  100. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement