Wordpress Woocommerce反向描述和简短描述单个产品页面

Wordpress Woocommerce反向描述和简短描述单个产品页面,wordpress,woocommerce,Wordpress,Woocommerce,我想反向说明和简短的说明单一产品的网页上woocommerce。我试试这套芭蕾舞。 简短的描述工作,但不是描述 我使用低音扬声器版本2.3.7 谢谢您可以在后端交换摘录和主要内容。。。。将内容保存在摘录框中,反之亦然。否则,您需要覆盖2个WooCommerce模板,并使用摘录反转内容 在主题中,将其添加为woocommerce/single product/short description.phppost\u摘录替换为post\u内容 <?php /** * Single produc

我想反向说明和简短的说明单一产品的网页上woocommerce。我试试这套芭蕾舞。 简短的描述工作,但不是描述

我使用低音扬声器版本2.3.7


谢谢

您可以在后端交换摘录和主要内容。。。。将内容保存在摘录框中,反之亦然。否则,您需要覆盖2个WooCommerce模板,并使用摘录反转内容

在主题中,将其添加为
woocommerce/single product/short description.php
post\u摘录
替换为
post\u内容

<?php
/**
 * Single product short description
 *
 * @author      WooThemes
 * @package     WooCommerce/Templates
 * @version     1.6.4
 */

if ( ! defined( 'ABSPATH' ) ) {
    exit; // Exit if accessed directly
}

global $post;

if ( ! $post->post_content ) {
    return;
}

?>
<div itemprop="description">
    <?php the_content() ?>
</div>
基本上,
重复完整的描述,而
重复简短的描述


在您的布局中,只需将它们切换为您想要的回声。还要确保产品帖子中的两个文本区域(内容/摘录)都包含一些文本。

如果您在问题中发布了相关代码,那就太好了。
<?php
/**
 * Description tab
 *
 * @author      WooThemes
 * @package     WooCommerce/Templates
 * @version     2.0.0
 */

if ( ! defined( 'ABSPATH' ) ) {
    exit; // Exit if accessed directly
}

global $post;

$heading = esc_html( apply_filters( 'woocommerce_product_description_heading', __( 'Product Description', 'woocommerce' ) ) );

?>

<?php if ( $heading ): ?>
  <h2><?php echo $heading; ?></h2>
<?php endif; ?>

<?php echo apply_filters( 'woocommerce_short_description', $post->post_excerpt ) ?>