<?php get_header(); ?>
<div id="content">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class('clearfix'); ?>>
<div class="cover">
<!-- post format thingy starts here ; if you are trying to learn this-->
<?php
if ( has_post_format( 'chat' ) ) : { ?>
<!-- big block of HTML to format a chat post -->
<?php $format_link = get_post_format_link('chat'); ?>
<a href="<?php echo $format_link ?>" class="format-icon f-chat"> </a>
<div class="title">
<h2> <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"> <?php the_title(); ?> </a> </h2>
</div>
<div class="entry">
<?php the_content('Read the rest of this entry »'); ?>
<div class="clear"></div>
</div>
<?php }
elseif ( has_post_format( 'video' ) ) : { ?>
<!-- big block of similar HTML to format a video post -->
<?php $format_link = get_post_format_link('video'); ?>
<a href="<?php echo $format_link ?>" class="format-icon f-video"> </a>
<div class="title">
<h2> <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"> <?php the_title(); ?> </a> </h2>
</div>
<div class="entry">
<?php the_content('ادامهي مطلب »'); ?>
<div class="clear"></div>
</div>
<div class="media-frame">
<?php $video=get_post_meta($post->ID, 'wtf_video', true); ?>
<?php echo $video; ?>
</div>
<?php }
elseif ( has_post_format( 'image' ) ) : { ?>
<!-- big block of similar HTML to format an image post -->
<?php $format_link = get_post_format_link('image'); ?>
<a href="<?php echo $format_link ?>" class="format-icon f-image"> </a>
<?php
if ( has_post_thumbnail() ) { ?>
<a rel="prettyPhoto" href="<?php echo get_image_url()?>" class="bport porthov">
<img class="formig" src="<?php bloginfo('stylesheet_directory'); ?>/timthumb.php?src=<?php get_image_url(); ?>&h=300&w=610&zc=1" alt=""/>
</a>
<?php } else { ?>
<img class="formig" src="<?php bloginfo('template_directory'); ?>/images/dummy.png" alt="" />
<?php } ?>
<div class="title">
<h2> <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"> <?php the_title(); ?> </a> </h2>
</div>
<div class="entry">
<?php the_content('ادامهي مطلب »'); ?>
<div class="clear"></div>
</div>
<?php }
elseif ( has_post_format( 'link' ) ) : { ?>
<!-- big block of similar HTML to format a link -->
<?php $format_link = get_post_format_link('link'); ?>
<a href="<?php echo $format_link ?>" class="format-icon f-link"> </a>
<?php $link = get_post_meta($post->ID, 'wtf_link', $single = true); ?>
<div class="title">
<h2> <a href="<?php echo $link ?>" title="<?php the_title(); ?>"> <?php the_title(); ?> </a> </h2>
</div>
<div class="entry">
<?php wpe_excerpt('wpe_excerptlength_index', ''); ?>
<div class="clear"></div>
</div>
<?php }
elseif ( has_post_format( 'quote' ) ) : { ?>
<!-- big block of similar HTML to format a quote -->
<?php $format_link = get_post_format_link('quote'); ?>
<a href="<?php echo $format_link ?>" class="format-icon f-quote"> </a>
<div class="entry">
<div class="quote-frame">
<div class="darrow"></div>
<?php the_content('ادامهي مطلب »'); ?>
<div class="clear"></div>
</div>
<div class="quoter">
<?php $quoter = get_post_meta($post->ID, 'wtf_quoter', $single = true); ?>
<h3><?php echo $quoter; ?></h3>
</div>
</div>
<?php }
elseif ( has_post_format( 'audio' ) ) : { ?>
<!-- big block of similar HTML to format an audio post -->
<div class="title">
<h2> <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"> <?php the_title(); ?> </a> </h2>
</div>
<div class="entry">
<?php the_content('ادامهي مطلب »'); ?>
<div class="clear"></div>
</div>
<?php $format_link = get_post_format_link('audio'); ?>
<a href="<?php echo $format_link ?>" class="format-icon f-audio"> </a>
<div class="media-frame">
<?php $audio = get_post_meta($post->ID, 'wtf_audio', $single = true); ?>
<div id='mediaspace-<?php the_ID(); ?>'>This text will be replaced</div>
<script type='text/javascript'>
jwplayer('mediaspace-<?php the_ID(); ?>').setup({
'flashplayer': '<?php bloginfo('template_directory'); ?>/lib/player.swf',
'file': '<?php echo $audio; ?>',
'backcolor': '111111',
'frontcolor': 'cccccc',
'lightcolor': '66cc00',
'playlistsize': '200',
'skin': '<?php bloginfo('template_directory'); ?>/lib/stylish_slim.swf',
'playlist': 'bottom',
'controlbar': 'bottom',
'width': '530',
'height': '32'
});
</script>
</div>
<?php }
elseif ( has_post_format( 'aside' ) ) : { ?>
<!-- big block of similar HTML to format an aside ( small blurb of text with no title ) -->
<?php $format_link = get_post_format_link('aside'); ?>
<a href="<?php echo $format_link ?>" class="format-icon f-aside"> </a>
<div class="entry">
<?php the_content('ادامهي مطلب »'); ?>
<div class="clear"></div>
</div>
<?php }
else : { ?>
<!-- big block of similar HTML to format other posts or called standard -->
<a class="format-icon f-post"> </a> <!-- sorry guys, wordpress cannot query the standard post format, so I can't link the icon -->
<div class="title">
<h2> <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"> <?php the_title(); ?> </a> </h2>
</div>
<div class="entry">
<?php wpe_excerpt('wpe_excerptlength_index', ''); ?>
<div class="clear"></div>
</div>
<?php } endif; ?>
<!-- aaand the post format thingy ends here -->
</div>
<div class="postmeta clearfix">
<span class="clock"> <?php days_ago(); ?></span>
<span class="cats"> <?php the_category(' , '); ?></span>
<span class="coms"><?php comments_popup_link('ديدگاه', '1 ديدگاه', '% ديدگاه'); ?> </span>
<span class="perml"><a href="<?php the_permalink() ?>" rel="bookmark" title="لينك ثابت به <?php the_title(); ?>">ادامهي مطلب</a></span>
</div>
</div>
<?php endwhile; ?>
<div class="clear"></div>
<?php getpagenavi(); ?>
<?php else : ?>
<h1 class="title">Not Found</h1>
<p>متاسفانه چیزی که دنبال آن میگردید پیدا نشد</p>
<?php endif; ?>
<?php wp_reset_query(); ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>