web/wp-content/themes/elegant-box/index.php
changeset 1 0d28b7c10758
equal deleted inserted replaced
0:0d9a58d2c515 1:0d28b7c10758
       
     1 <?php get_header(); ?>
       
     2 <?php
       
     3 	$options = get_option('elegantbox_options');
       
     4 	if (function_exists('wp_list_comments')) {
       
     5 		add_filter('get_comments_number', 'comment_count', 0);
       
     6 	}
       
     7 ?>
       
     8 
       
     9 		<?php if ($options['notice']) : ?>
       
    10 			<div id="notice">
       
    11 				<div class="inner">
       
    12 					<?php if ($options['notice_icon']) : ?>
       
    13 						<img class="icon" src="<?php bloginfo('template_url'); ?>/images/transparent.gif" alt="notice" />
       
    14 					<?php endif; ?>
       
    15 					<div class="content"><?php echo($options['notice_content']); ?></div>
       
    16 					<div class="fixed"></div>
       
    17 				</div>
       
    18 			</div>
       
    19 		<?php endif; ?>
       
    20 
       
    21 		<?php if (have_posts()) : while (have_posts()) : the_post(); update_post_caches($posts); ?>
       
    22 
       
    23 				<div class="post">
       
    24 					<div class="title">
       
    25 						<h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
       
    26 						<div class="fixed"></div>
       
    27 					</div>
       
    28 
       
    29 					<div class="info">
       
    30 						<?php edit_post_link(__('Edit', 'elegantbox'), '<span class="edit">', '</span>'); ?>
       
    31 
       
    32 						<span><?php the_time(__('F jS, Y', 'elegantbox')) ?></span>
       
    33 						<?php if ($options['categories']) : ?>
       
    34 							<span><?php _e(' | Categories: ', 'elegantbox'); ?><?php the_category(', ') ?></span>
       
    35 						<?php endif; ?>
       
    36 						<?php if ($options['tags']) : ?>
       
    37 							<span><?php _e(' | Tags: ', 'elegantbox'); ?><?php the_tags('', ', ', ''); ?></span>
       
    38 						<?php endif; ?>
       
    39 
       
    40 						<div class="fixed"></div>
       
    41 					</div>
       
    42 
       
    43 					<div class="content">
       
    44 						<?php the_content(__('Read more...', 'elegantbox')); ?>
       
    45 						<div class="fixed"></div>
       
    46 					</div>
       
    47 
       
    48 					<div class="comments">
       
    49 						<?php comments_popup_link(__('0 comments', 'elegantbox'), __('1 comment', 'elegantbox'), __('% comments', 'elegantbox')); ?>
       
    50 						<?php if (function_exists('the_views')) : ?>
       
    51 							(<?php the_views(); ?>)
       
    52 						<?php endif; ?>
       
    53 					</div>
       
    54 				</div>
       
    55 
       
    56 		<?php endwhile; else : ?>
       
    57 			<div class="messagebox">
       
    58 				<div class="content small">
       
    59 					<?php _e('Sorry, no posts matched your criteria.', 'elegantbox'); ?>
       
    60 				</div>
       
    61 			</div>
       
    62 
       
    63 		<?php endif; ?>
       
    64 	</div>
       
    65 
       
    66 	<?php get_sidebar(); ?>
       
    67 
       
    68 	<div class="fixed"></div>
       
    69 
       
    70 		<div id="bottom">
       
    71 			<div class="postnav">
       
    72 
       
    73 	<?php if(function_exists('wp_pagenavi')) : ?>
       
    74 				<?php wp_pagenavi() ?>
       
    75 	<?php else : ?>
       
    76 				<span class="alignleft"><?php previous_posts_link(__('&laquo; Newer Entries', 'elegantbox')); ?></span>
       
    77 				<span class="alignright"><?php next_posts_link(__('Older Entries &raquo;', 'elegantbox')); ?></span>
       
    78 	<?php endif; ?>
       
    79 
       
    80 				<div class="fixed"></div>
       
    81 			</div>
       
    82 
       
    83 <?php get_footer(); ?>