我的模板(wordpress)有问题.我想创建一个包含3列的投资组合页面,可以在我的投资组合页面中显示帖子(无需跳过新页面).我需要在每三个帖子后重复这三个帖子.我将"隐藏"类分配给我的重复帖子,当点击列时,类应设置为"阻止".我有一个代码:
<?php get_header(); ?>
<section> <div class="container container-bazar container-gallery"><?php
$array = array();
$count = 0;
$i = 0;
$args = array(
'posts_per_page' => -1,
'post_type' => 'gallery',
);
$gallery = new WP_Query( $args );
if($gallery->have_posts()) :
while($gallery->have_posts()) :
$gallery->the_post(); ?>
<div class="col-1 boxes<?php if( $count%3 == 0 ) { echo '-1'; }; $count++; ?>">
<div class="post" id="post-<?php the_ID(); ?>">
<figure class="indent-bot">
<a href="<?php the_permalink(); ?>" rel="nofollow">
<?php the_post_thumbnail(array(380,220,true)); ?>
</a>
</figure>
<div class="col-1-content">
<strong class="title-3">
<a href="<?php the_permalink(); ?>" rel="nofollow"> …Run Code Online (Sandbox Code Playgroud) 我使用插件 WooCommerce。我想为所有不同的商品输入相同的价格。为此,我们必须手动设置每个选项的价格。
如何为所有变体设置一次价格?
