小编Kie*_*erd的帖子

WooCommerce类别和ACF

我正在使用高级自定义字段(ACF)插件。在WooCommerce产品类别中,我想要一个seo的内容区域。ACF可以帮到我,但不起作用,因为该站点的前端未显示任何内容。

content-product.php 有多余的字段:

<li <?php post_class(); ?> style="max-width:<?php echo $column_width; ?>px">
    <div class="mk-product-holder">
    <?php do_action( 'woocommerce_before_shop_loop_item' ); ?>

        <div class="mk-love-holder">
        <?php if( function_exists('mk_love_this') ) mk_love_this();      ?>
        </div>

        <h3><a href="<?php echo get_permalink();?>"><?php the_title(); ?></a>

        // Here is the extrafield SEO-text, the field is registered in fields with name "extratext"
        <?php echo get_field('extratext'); ?>       

        </h3>
    </div>
</li>
Run Code Online (Sandbox Code Playgroud)

WooCommerce类别屏幕截图: http //www.directupload.net/file/d/3952/kzb8dcjk_png.htm

wordpress woocommerce advanced-custom-fields

2
推荐指数
1
解决办法
3053
查看次数