我想在自定义产品页面上获取变量产品的变体.我有两个属性,一个用于尺寸作为选择,另一个用于颜色作为色板.我无法显示需要显示的属性的问题,当我使用以下代码时,它返回大小或颜色的文本名称,而不是大小或颜色样本的选择下拉列表.有什么帮助吗?!
echo implode(', ', wc_get_product_terms( $product_id, 'pa_colors' ));
Run Code Online (Sandbox Code Playgroud) 我需要知道如何在.row类中自动添加x个WordPress帖子,因为我在Bootsrap上工作.
这是我的Posts循环代码.
<div id="main" class="container" role="main">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article class="col-md-6" id="post-<?php the_ID(); ?>" <?php post_class( 'clearfix' ); ?> role="article">
<header class="article-header">
<h1 class="h2"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
<p class="byline vcard"><?php
printf( __( 'Posted <time class="updated" datetime="%1$s" pubdate>%2$s</time> by <span class="author">%3$s</span> <span class="amp">&</span> filed under %4$s.', 'bonestheme' ), get_the_time('Y-m-j'), get_the_time(get_option('date_format')), bones_get_the_author_posts_link(), get_the_category_list(', '));
?></p>
</header>
<section class="entry-content clearfix">
<?php the_content(); ?>
</section>
<footer class="article-footer">
<p class="tags"><?php the_tags( '<span class="tags-title">' …Run Code Online (Sandbox Code Playgroud)