我的主题有问题,我无法获得常规支持。主题以房地产为导向,似乎是由WooCommerce“产品”驱动的。
我把它们都设置为“特色”,但似乎只有通过“虚拟数据导入”制作的产品才会出现。任何“新”产品都不会出现在适当的区域,我很困惑。至少应展示六种“特色”产品。我主演的那些似乎出现了,其他的没有。。。不知道
这里有一个链接可以帮助解释,“最近”和“特色”产品应该看起来一样,因为所有产品都设置为“特色”。
http://www.tjwoodruff.com/main/
以下是“特色”产品的代码。<?php
/***主页左侧显示产品内容的模板。**@作者Tokokoo*@package joglo*@版本1.0*@开发Alispx*/?> <h4 class="title-wrap">
<?php _e( \'Featured Properties\', \'tokokoo\' ); ?>
<?php $shop_page_url = get_permalink( wc_get_page_id( \'shop\' ) ); ?>
<a href="<?php echo $shop_page_url; ?>" class="product-type"><?php _e( \'View All Properties\', \'tokokoo\' ); ?></a></h4>
<?php
$left_args = array(
\'post_type\' => \'product\',
\'post_status\' => \'publish\',
\'posts_per_page\' => 6,
\'meta_key\' => \'_featured\',
\'meta_value\' => \'yes\'
);
$featured_left = new WP_Query( $left_args ); ?>
<?php if ( $featured_left->have_posts() ) : ?>
<ul class="products item-wrap">
<?php while ( $featured_left->have_posts() ) : $featured_left->the_post(); ?>
<li class="product the-items">
<figure class="item-img">
<?php
if ( current_theme_supports( \'get-the-image\' ) )
get_the_image( array( \'meta_key\' => \'Thumbnail\', \'size\' => \'tokokoo-featured-product\', \'link_to_post\' => true ) );
?>
</figure>
<div class="item-data">
<div class="data-top">
<?php woocommerce_template_loop_price(); ?>
</div>
<div class="data-bottom">
<div class="inner">
<?php tokokoo_display_property_meta(); ?>
<div class="item-title">
<h3 class="title-product"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
</div>
<?php woocommerce_template_loop_rating(); ?>
</div>
</div>
</div>
</li>
<?php endwhile; ?>
</ul>
<?php else : ?>
<?php woocommerce_get_template( \'loop/no-products-found.php\' ); ?>
<?php endif; wp_reset_postdata(); ?>
</div>
工作特色产品


