web/wp-content/themes/elegant-box/single.php
changeset 1 0d28b7c10758
equal deleted inserted replaced
0:0d9a58d2c515 1:0d28b7c10758
       
     1 <?php get_header(); ?>
       
     2 <?php $options = get_option('elegantbox_options'); ?>
       
     3 
       
     4 		<?php if (have_posts()) : the_post(); ?>
       
     5 
       
     6 			<div class="post">
       
     7 				<div class="title">
       
     8 					<h2><?php the_title(); ?></h2>
       
     9 					<div class="fixed"></div>
       
    10 				</div>
       
    11 
       
    12 				<div class="info">
       
    13 					<?php edit_post_link(__('Edit', 'elegantbox'), '<span class="edit">', '</span>'); ?>
       
    14 
       
    15 					<span><?php the_time(__('F jS, Y', 'elegantbox')) ?></span>
       
    16 					<?php if ($options['categories']) : ?>
       
    17 						<span><?php _e(' | Categories: ', 'elegantbox'); ?><?php the_category(', ') ?></span>
       
    18 					<?php endif; ?>
       
    19 					<?php if ($options['tags']) : ?>
       
    20 						<span><?php _e(' | Tags: ', 'elegantbox'); ?><?php the_tags('', ', ', ''); ?></span>
       
    21 					<?php endif; ?>
       
    22 
       
    23 					<div class="fixed"></div>
       
    24 				</div>
       
    25 
       
    26 				<div class="content">
       
    27 					<?php the_content(); ?>
       
    28 					<div class="fixed"></div>
       
    29 				</div>
       
    30 
       
    31 				<div class="comments comments_single">
       
    32 					<a href="#respond"><?php _e('Leave a comment', 'elegantbox'); ?></a>
       
    33 					<?php if(pings_open()) : ?>
       
    34 						 | <a href="<?php trackback_url(); ?>" rel="trackback"><?php _e('Trackback', 'elegantbox'); ?></a>
       
    35 					<?php endif; ?>
       
    36 				</div>
       
    37 
       
    38 				<!-- related posts START -->
       
    39 				<?php
       
    40 					if(function_exists('wp23_related_posts')) {
       
    41 						echo '<div id="related_posts">';
       
    42 						wp23_related_posts();
       
    43 						echo '</div>';
       
    44 					}
       
    45 				?>
       
    46 				<!-- related posts END -->
       
    47 			</div>
       
    48 
       
    49 <?php
       
    50 	// Support comments for WordPress 2.7 or higher
       
    51 	if (function_exists('wp_list_comments')) {
       
    52 		comments_template('', true);
       
    53 	} else {
       
    54 		comments_template();
       
    55 	}
       
    56 ?>
       
    57 
       
    58 		<?php else : ?>
       
    59 			<div class="messagebox">
       
    60 				<div class="content small">
       
    61 					<?php _e('Sorry, no posts matched your criteria.', 'elegantbox'); ?>
       
    62 				</div>
       
    63 			</div>
       
    64 
       
    65 		<?php endif; ?>	
       
    66 
       
    67 	</div>
       
    68 
       
    69 	<?php $post_backup = $post; get_sidebar(); $post = $post_backup; ?>
       
    70 
       
    71 	<div class="fixed"></div>
       
    72 
       
    73 		<div id="bottom">
       
    74 			<div class="postnav">
       
    75 				<span class="alignleft"><?php previous_post_link('&laquo; %link') ?></span>
       
    76 				<span class="alignright"><?php next_post_link('%link &raquo;') ?></span>
       
    77 				<div class="fixed"></div>
       
    78 			</div>
       
    79 
       
    80 <?php get_footer(); ?>