?<?php get_header(); ?><center><div id="wrapper" class="clear"><?php include(TEMPLATEPATH.'/sidebar-right.php'); ?><div id="wrap"><?php if(have_posts()): ?><?php while(have_posts()):the_post(); ?><?php $img = get_post_meta($post->ID, "img", true);$post_excerpt = $post->post_content; ?>
<?php $price = get_post_meta($post->ID, 'price', true); ?>
<?php $buy = get_post_meta($post->ID, 'buy', true); ?><div class="post-top"><div class="post-title"><?php the_title(); ?></div><div class="view"><?php if(function_exists('the_views')) { the_views(); } ?> بازديد</div></div><div class="post-box"><div class="post"><div class="cat"><font face="Tahoma" size="1" color="#666666" >دسته بندي : </font><?php the_category(', ') ?></div><div class="pad-box"><img src="<?php echo $img; ?>" width="140" height="180" alt="<?php the_title(); ?>" align="right"/><?php the_content(''); ?></div><div class="pad-price"><div class="price"><p dir="rtl" style="padding-top:1px ;"><B><font color="#FFFFFF"><?php echo $price; ?> تومان </font></B></div></div></div><br><br><br><p style="text-align: justify;padding-left: 10px; padding-right: 10px" dir="rtl"><img border="0" alt="icon" src="<?php bloginfo('template_directory'); ?>/img/pay.gif" width="16" height="16"> براي خريد <B><?php the_title(); ?></B> پس از کليک روي دکمه زير و تکميل فرم سفارش، ابتدا محصول يا محصولات مورد نظرتان را درب منزل يا محل کار تحويل بگيريد، سپس وجه کالا و هزينه ارسال را به مامور پست بپردازيد. جهت مشاهده فرم خريد، روي دکمه زير کليک کنيد.</p><center><a target="blank" href="<?php echo $buy; ?>" rel="nofollow"><img border="0" alt="" src="<?php bloginfo('template_directory'); ?>/img/buy.gif" width="145" height="40"></a></center><br><div class="tagm"><font face="Tahoma" size="1" color="#666666" > <B> <?php the_tags('برچسب ها: '); ?></B></div><div class="relat"><blockquote>محصولات مرتبط :<?php
if ( is_single() ) {
$categories = get_the_category();
if ($categories) {
foreach ($categories as $category) {
$cat = $category->cat_ID;
$args=array(
'cat' => $cat,
'post__not_in' => array($post->ID),
'posts_per_page'=>5,
'caller_get_posts'=>1
);
$my_query = null;
$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="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></li>
<?php
endwhile;
} //if ($my_query)
} //foreach ($categories
} //if ($categories)
wp_reset_query(); // Restore global post data stomped by the_post().
} //if (is_single())
?></font></blockquote></div></div><div class="post-down"></div><br/> <div class="nav"><div class="rp" dir="ltr"><?php next_post_link('%link »') ?></div><div class="lp" dir="ltr"><?php previous_post_link('« %link ') ?></div></div><?php endwhile; ?><?php else: ?><?php endif; ?><?php comments_template(); ?></div><?php include(TEMPLATEPATH.'/sidebar-left.php'); ?></div><div class="clear"></div></div><?php get_footer(); ?>