wp/wp-content/themes/IN-MOTION-package-u1/in-motion/archive.php
changeset 0 d970ebf37754
child 1 f6eb5a861d2f
equal deleted inserted replaced
-1:000000000000 0:d970ebf37754
       
     1 <?php get_header(); ?>
       
     2 	<div id="content" class="clearfix mh800">
       
     3 	<div id="blog-post"><!-- start BLOG section -->
       
     4 	<?php menu(-1); ?>
       
     5 	<div class="clearfix"></div>
       
     6 						<div class="page-title mt37" >
       
     7 							<h2  class="titleH2"><?php _e('Archive','pego_tr'); ?></h2>
       
     8 							<span class="shortDesc11">}</span><p class="shortDesc12">Our archive...</p>
       
     9 		
       
    10 						</div>
       
    11 					</div>
       
    12 		<div id="main-left" class="fl">
       
    13 
       
    14 		<?php if (have_posts()) : ?>
       
    15 
       
    16  			<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
       
    17 
       
    18 			<?php /* If this is a category archive */ if (is_category()) { ?>
       
    19 				<h3 class="archiveSearchFont"><?php _e('Archive for the','pego_tr'); ?> &#8216;<?php single_cat_title(); ?>&#8217; <?php _e('Category','pego_tr'); ?></h3>
       
    20 
       
    21 			<?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
       
    22 				<h3 class="archiveSearchFont"><?php _e('Posts Tagged','pego_tr'); ?> &#8216;<?php single_tag_title(); ?>&#8217;</h3>
       
    23 
       
    24 			<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
       
    25 				<h3 class="archiveSearchFont"><?php _e('Archive for','pego_tr'); ?> <?php the_time('F jS, Y'); ?></h3>
       
    26 
       
    27 			<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
       
    28 				<h3 class="archiveSearchFont"><?php _e('Archive for','pego_tr'); ?> <?php the_time('F, Y'); ?></h3>
       
    29 
       
    30 			<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
       
    31 				<h3 class="archiveSearchFont"><?php _e('Archive for','pego_tr'); ?> <?php the_time('Y'); ?></h3>
       
    32 
       
    33 			<?php /* If this is an author archive */ } elseif (is_author()) { ?>
       
    34 				<h3 class="archiveSearchFont"><?php _e('Author Archive','pego_tr'); ?></h3>
       
    35 
       
    36 			<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
       
    37 				<h3 class="archiveSearchFont"><?php _e('Blog Archives','pego_tr'); ?></h3>
       
    38 			
       
    39 			<?php } ?>
       
    40 
       
    41 			<?php include (TEMPLATEPATH . '/inc/nav.php' ); ?>
       
    42 
       
    43 			<?php while (have_posts()) : the_post();     ?>
       
    44 			<?php 
       
    45 				$postType = get_post_meta($post->ID, 'post_type_selected' , true); 
       
    46 				if($postType == 'News'){continue;}
       
    47 			?>	
       
    48 			
       
    49 			
       
    50 				<div <?php post_class() ?>>
       
    51 					<p class="blog-post-date"><?php the_time('F j, Y') ?></p>
       
    52 					<h3 class="blog-post-title blogposttitleExtra"><a href="<?php the_permalink() ?>" class="tdn"><?php the_title(); ?></a></h3>
       
    53 					
       
    54 				<div class="blog-line mt10"></div>
       
    55 				<div class="blog-details">
       
    56 					<ul>
       
    57 						<li><span><?php echo getPostViews(get_the_ID()); ?></span> <?php _e('Views','pego_tr'); ?></li>
       
    58 						<li>/</li>
       
    59 						<li><span><?php comments_number( '0', '1', '%' ); ?></span> <?php _e('Comments','pego_tr'); ?> </li>
       
    60 						<li>/</li>
       
    61 						<li><span><?php _e('in','pego_tr'); ?> <a href="#"><?php the_category(', '); ?></a></span></li>
       
    62 						<li>/</li>
       
    63 						<li><span><?php _e('by','pego_tr'); ?> <?php the_author() ?></span></li>	
       
    64 					</ul>
       
    65 				</div>	
       
    66 				<div class="blog-line mb15"></div>
       
    67 					<div class="clearfix"></div>
       
    68 						<?php 
       
    69 							$content = get_post($post->ID)->post_content;
       
    70 							if (strlen($content) > 353)
       
    71 							{
       
    72 								$content = substr($content,0,350).'...';
       
    73 							}						
       
    74 						?>	
       
    75             <div class="entry mt10">
       
    76 				<?php if (get_post_type() == 'post') { 
       
    77 				?>	
       
    78 					<?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?>
       
    79 					<div class="one-third-search fl mt-10"><a href="<?php the_permalink() ?>"  class="lightbox-image"><img src="<?php echo get_template_directory_uri(); ?>/scripts/timthumb.php?src=<?php echo $image[0]; ?>&h=129&w=208&zc=1" alt="" title="<?php the_title(); ?>" /></a></div>
       
    80 					<div class="two-third-search last-column fl mt-15"><p><?php echo $content; ?></p></div>				
       
    81 				<?php  }
       
    82 				else {?>
       
    83 							<p><?php echo $content; ?></p>	
       
    84 				<?php } ?>
       
    85 					
       
    86 		    		<div class="clearfix"></div><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" class="readmore readmoreExtra" ><span>View</span></a>
       
    87 				</div>
       
    88 				</div>
       
    89 			<?php endwhile; ?>
       
    90 			<?php include (TEMPLATEPATH . '/inc/nav.php' ); ?>			
       
    91 	<?php else : ?>
       
    92 		<h2><?php _e('Nothing found','pego_tr'); ?></h2>
       
    93 
       
    94 	<?php endif; ?>
       
    95 </div>
       
    96 		<div id="sidebar-right" class="fl mt-30" > 
       
    97 			<?php get_sidebar(); ?>
       
    98 		</div>
       
    99 	</div>
       
   100 </div>
       
   101 <?php get_footer(); ?>