<?php get_header(); ?>
<div id="column">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<!-- ^^^^^^^^^^^^^^ post code ^^^^^^^^^^^^^^ -->
<div class="post" id="post-<?php the_ID(); ?>">
<div class="post-top"></div>
<div class="entry">
<h2><?php the_title(); ?></h2>
<span class="date"><?php the_time('l, F j, Y'); ?> <?php the_time('G:i'); ?></span>
<div class="info">
<div class="cat">ارسال شده در قسمت : <?php the_category(', ') ?></div>
<div class="comments"><?php comments_popup_link('بدون نظر', 'يك نظر', '% نظر'); ?>
<?php the_views() ?>
</div>
<div class="clear"></div>
</div>
<div class="content">
<?php the_content('Read the rest of this entry »'); ?><div class="clear"></div>
<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
</div>
<div class="follow">شما مي توانيد نظرات اين مطلب را با <?php post_comments_feed_link('RSS 2.0'); ?> دنبال كنيد ..</div>
<?php
$tags = wp_get_post_tags($post->ID);
if ($tags) {
$tag_ids = array();
foreach($tags as $individual_tag) $tag_ids[] = $individual_tag->term_id;
$args=array(
'tag__in' => $tag_ids,
'post__not_in' => array($post->ID),
'showposts'=>5, // تعداد مطالب مرتبط جهت نمایش
'caller_get_posts'=>1
);
$my_query = new wp_query($args);
if( $my_query->have_posts() ) {
echo '<ul>';
while ($my_query->have_posts()) {
$my_query->the_post();
?>
<li><a href="<?php the_permalink() ?>" rel="bookmark" title="پیوند دائمی به <?php the_title_attribute(); ?>"><?php the_title(); ?></a></li>
<?php
}
echo '</ul>';
}
}
wp_reset_query();
?>
<div class="state">
<?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) { ?>
<a href="#respond">[ ارسال نظر ]</a> - <a href="<?php trackback_url(); ?>" rel="trackback">[ ارسال بازتاب ]</a>
<?php } elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) { ?>
Responses are currently closed, but you can <a href="<?php trackback_url(); ?>" rel="trackback">trackback</a> from your own site.
<?php } elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) { ?>
You can skip to the end and leave a response. Pinging is currently not allowed.
<?php } elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) { ?>
Both comments and pings are currently closed.
<?php } ?>
</div>
<div class="tags"><?php edit_post_link('ويرايش اين مطلب', '', ' | '); ?><?php the_tags('كلمات كليدي : ', ', ', ''); ?></div>
<?php comments_template(); ?>
</div>
<div class="post-bottom"></div>
</div>
<!-- ^^^^^^^^^^^^^^ post code ^^^^^^^^^^^^^^ -->
<?php endwhile; ?>
<!-- ^^^^^^^^^^^^^^ post navigation ^^^^^^^^^^^^^^ -->
<div class="navigation">
<div class="navleft"><?php previous_post_link('« %link') ?></div>
<div class="navright"><?php next_post_link('%link »') ?></div>
<div class="clear"></div>
</div>
<!-- ^^^^^^^^^^^^^^ post navigation ^^^^^^^^^^^^^^ -->
<?php else : ?>
<!-- ^^^^^^^^^^^^^^ page not found + search form ^^^^^^^^^^^^^^ -->
<div class="post">
<div class="post-top"></div>
<div class="entry">
<div class="content">
<h1>Page Not Found</h1>
<p>Sorry, but you are looking for something that isn't here.</p>
<h3>Search Blog</h3>
<?php include(TEMPLATEPATH."/searchform.php"); ?>
</div>
</div>
<div class="post-bottom"></div>
</div>
<!-- ^^^^^^^^^^^^^^ page not found + search form ^^^^^^^^^^^^^^ -->
<?php endif; ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>