Advertisement
gourmetbooks

Underground Guide index.php

Apr 17th, 2013
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.05 KB | None | 0 0
  1. <?php
  2. /*
  3.  * The single post template for our theme.
  4.  *
  5.  * Displays content when viewing a single post. Used in place of single.php.
  6.  *
  7.  * @package Response
  8.  * @since Response 1.0
  9.  *
  10.  */
  11.  get_header(); ?>
  12.  
  13. <!-- BEGIN #content -->
  14. <div id="content">
  15.  
  16.     <!-- BEGIN .row -->
  17.     <div class="row">
  18.    
  19.         <!-- BEGIN .eight columns -->
  20.         <div class="eight columns">
  21.    
  22.             <div <?php post_class('content holder'); ?> id="page-<?php the_ID(); ?>">
  23.    
  24.                 <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  25.                 <?php $meta_box = get_post_custom($post->ID); $video = $meta_box['custom_meta_video'][0]; ?>
  26.                
  27.                 <?php if (has_post_format('gallery')) { ?>
  28.                
  29.                     <div class="slideshow">        
  30.                         <div class="flexslider">
  31.                             <ul class="slides">
  32.                            
  33.                                 <?php $data = array(
  34.                                     'post_parent'       => $id,
  35.                                     'post_type'         => 'attachment',
  36.                                     'post_mime_type'    => 'image',
  37.                                     'order'             => 'ASC',
  38.                                     'orderby'           => 'menu_order',
  39.                                     'numberposts'       => -1
  40.                                 ); ?>
  41.                                
  42.                                 <?php
  43.                                 $images = get_posts($data); foreach( $images as $image ) {
  44.                                     $imageurl = wp_get_attachment_url($image->ID);
  45.                                     echo '<li><img src="'.$imageurl.'" /></li>' . "\n";
  46.                                 } ?>
  47.                    
  48.                             </ul>
  49.                         </div>
  50.                     </div>
  51.                    
  52.                 <?php } else { } ?>
  53.                
  54.                
  55.                 <div class="article">
  56.        
  57.                     <h1 class="headline"><?php the_title(); ?></h1>
  58.    
  59.                     <div class="postauthor">            
  60.                         <p class="left"><i class="icon-user"></i> &nbsp;<?php _e("Posted by", 'organicthemes'); ?> <?php the_author_posts_link(); ?> <?php _e("on", 'organicthemes'); ?> <?php the_time(__("F j, Y", 'organicthemes')); ?></p>
  61.                         <p class="right">
  62.                             <?php
  63.                             if ( in_category('6') ) {
  64.                             echo "<i class=\"icon-comment\"></i> &nbsp;<a class=\"scroll\" href=\"<?php the_permalink(); ?>#comments\"><?php comments_number(__(\"Leave a Comment\", 'organicthemes'), __(\"1 Comment\", 'organicthemes'), '% Comments'); ?></a></p>";
  65.                             } else {
  66.                             echo "<a href=\"http://www.undergroundabq.com/submit/\">Edit this Review</a>";
  67.                             }
  68.                             ?>
  69.                     </div>
  70.                    
  71.                     <?php if(of_get_option('display_feature_post') == '1') { ?>
  72.                         <?php if ( $video ) : ?>
  73.                             <div class="feature-vid"><?php echo $video; ?></div>
  74.                         <?php else: ?>
  75.                             <?php if ( has_post_thumbnail()) { ?>
  76.                                 <div class="feature-img" style="background-color: <?php echo get_post_meta(get_the_ID(), 'bg_color', true); ?>;">
  77.                                     <?php the_post_thumbnail( 'feature' ); ?>
  78.                                 </div>
  79.                             <?php } else { } ?>
  80.                         <?php endif; ?>
  81.                     <?php } else { ?>
  82.                     <?php } ?>
  83.                    
  84.                         <!--If custom fields exist, include Details div-->
  85.    
  86.                             <?php
  87.                             $do_not_show = get_post_meta($post->ID, 'do_not_show', true);
  88.                             if ( $do_not_show ) NULL;
  89.                             else include 'details.php';
  90.                             ?>
  91.  
  92.                         <!--end Details div-->
  93.                    
  94.                     <?php the_content(__("Read More", 'organicthemes')); ?>
  95.  
  96.                     <?php wp_link_pages(array(
  97.                         'before' => '<p class="page-links"><span class="link-label">' . __('Pages:') . '</span>',
  98.                         'after' => '</p>',
  99.                         'link_before' => '<span>',
  100.                         'link_after' => '</span>',
  101.                         'next_or_number' => 'next_and_number',
  102.                         'nextpagelink' => __('Next'),
  103.                         'previouspagelink' => __('Previous'),
  104.                         'pagelink' => '%',
  105.                         'echo' => 1 )
  106.                     ); ?>
  107.                    
  108.                     <?php if(of_get_option('display_social_post') == '1') { ?>
  109.                     <div class="social">
  110.                         <div class="like-btn">
  111.                             <div class="fb-like" href="<?php echo urlencode(get_permalink($post->ID)); ?>" data-send="false" data-layout="button_count" data-width="100" data-show-faces="false"></div>
  112.                         </div>
  113.                         <div class="pin-btn">
  114.                             <a href="http://pinterest.com/pin/create/button/?url=<?php echo urlencode(get_permalink($post->ID)); ?>&media=<?php $feat_image = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); echo $feat_image; ?>&description=<?php the_title(); ?>" class="pin-it-button" count-layout="horizontal"><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" target="_blank" /></a>
  115.                         </div>
  116.                         <div class="tweet-btn">
  117.                             <a href="http://twitter.com/share" class="twitter-share-button"
  118.                             data-url="<?php the_permalink(); ?>"
  119.                             data-via="<?php echo of_get_option('twitter_user'); ?>"
  120.                             data-text="<?php the_title(); ?>"
  121.                             data-related=""
  122.                             data-count="horizontal"><?php _e("Tweet", 'organicthemes'); ?></a>
  123.                         </div>
  124.                         <div class="plus-btn">
  125.                             <g:plusone size="medium" annotation="bubble" href="<?php the_permalink(); ?>"></g:plusone>
  126.                         </div>
  127.                     </div>
  128.                     <?php } else { ?>
  129.                     <?php } ?>
  130.                    
  131.                     <?php edit_post_link(__("(Edit)", 'organicthemes'), '', ''); ?>
  132.                     <div class="clear"></div>
  133.                     <?php trackback_rdf(); ?>
  134.                
  135.                 <!-- END .article columns -->
  136.                 </div>
  137.                
  138.                 <div class="postmeta">
  139.                     <p class="left"><i class="icon-reorder"></i> &nbsp;<?php _e("Category:", 'organicthemes'); ?> <?php the_category(', '); ?></p>
  140.                     <?php if ( has_tag() ) { ?>
  141.                         <p class="right"><i class="icon-tags"></i> &nbsp;<?php _e("Tags:", 'organicthemes'); ?> <?php the_tags(''); ?></p>
  142.                     <?php } else { } ?>
  143.                 </div>
  144.                
  145.                 <div class="postcomments">
  146.                     <div class="article">
  147.                         <?php comments_template('', true); ?>
  148.                     </div>
  149.                 </div><!-- .postcomments -->
  150.            
  151.             <!-- END .post columns -->
  152.             </div>
  153.    
  154.             <?php endwhile; else: ?>
  155.             <p><?php _e("Sorry, no posts matched your criteria.", 'organicthemes'); ?></p>
  156.             <?php endif; ?>
  157.    
  158.         <!-- END .eight columns -->
  159.         </div>
  160.        
  161.         <div class="four columns">
  162.             <?php get_sidebar(); ?>
  163.         </div><!-- .four columns -->
  164.    
  165.    
  166.     <!-- END .row -->
  167.     </div>
  168.  
  169. <!-- END #content -->
  170. </div>
  171.  
  172. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement