<?php get_header();?>
<div id="recommend">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="recom_left">
<div class="minute">
<h2><?php the_title(); ?></h2>
<h4><?php echo mb_strimwidth(strip_tags(apply_filters('the_content', $post->post_content)), 0, 320,"……"); ?></h4>
<div class="minute_left">
<div class="min_left">
<?php
if((function_exists('has_post_thumbnail')) && (has_post_thumbnail())) {
echo the_post_thumbnail( array(440,280) );
}
else {
echo '<div class="nothumbnailth">缩略图</div>';
}
?>
</div>
<div class="min_right">
<div class="mrig_top">
<span>¥<?php $values = get_post_custom_values("price_value"); echo $values[0]; ?></span>
<a rel="nofollow" href="<?php $values = get_post_custom_values("link_value"); echo $values[0]; ?>" target="_blank">抢购</a>
</div>
<div class="rebate">
<p><span>节省:</span><span>¥<?php $values = get_post_custom_values("save_value"); echo $values[0]; ?></span></p>
</div>
<div class="time_end">
<dl>
<dd class="time_one">
<img src="<?php bloginfo('template_url'); ?>/images/cont_01.jpg">
<img src="<?php bloginfo('template_url'); ?>/images/cont_02.jpg">
<img src="<?php bloginfo('template_url'); ?>/images/cont_3.jpg">
<img src="<?php bloginfo('template_url'); ?>/images/cont_04.jpg">
<a href="#"><img src="<?php bloginfo('template_url'); ?>/images/cont_05.jpg"></a>
</dd>
<dd class="time_two">
<p><span class="orange"><?php if(function_exists('the_views')) { the_views(); } ?></span>人已购买</p>
<p>数量有限,下单要快哦!</p>
</dd>
</dl>
</div>
</div>
</div>
</div>
<div class="entry">
<div class="wer_border">
<?php the_content(); ?>
</div>
</div>
<div class="entry">
<div class="wer_border" id="related">
<h3>同类型商品推荐</h3>
<?php $tags = wp_get_post_tags($post->ID);
if ($tags) {
$first_tag = $tags[0]->term_id;
$args=array('tag__in' => array($first_tag),'post__not_in' => array($post->ID),'showposts'=>10,'caller_get_posts'=>1);
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
while ($my_query->have_posts()) : $my_query->the_post();
?>
<dl>
<dt>
<a href="<?php the_permalink() ?>" target="_blank">
<?php
if((function_exists('has_post_thumbnail')) && (has_post_thumbnail())) {
echo the_post_thumbnail( array(440,280) );
}
else {
echo '<div class="nothumbnailf">缩略图</div>';
}
?>
</a>
</dt>
<dd><span class="stroke">原价:<?php $values = get_post_custom_values("original_value"); echo $values[0]; ?>元</span><span class="orange">折扣价:<?php $values = get_post_custom_values("price_value"); echo $values[0]; ?>元</span></dd>
<dd><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>" target="_blank"><?php the_title();?></a></dd>
</dl>
<?php endwhile;
}
}
wp_reset_query();
?>
</div>
</div>
</div>
<?php endwhile; else: ?>
<div class="recom_left">
<div class="minute">
<h2>对不起,没有你所找的文章</h2>
</div>
</div>
<?php endif; ?>
<?php get_sidebar();?>
</div>
<?php get_footer();?>
基于PHP的wordpress团购淘客主题php版源码.zip
版权申诉
54 浏览量
2023-08-29
23:35:43
上传
评论
收藏 407KB ZIP 举报
毕业_设计
- 粉丝: 1925
- 资源: 1万+