Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用自定义html更改content-single-product.php页面_Php_Wordpress_Woocommerce - Fatal编程技术网

如何使用自定义html更改content-single-product.php页面

如何使用自定义html更改content-single-product.php页面,php,wordpress,woocommerce,Php,Wordpress,Woocommerce,我想在产品页面上显示我的自定义html代码,我已经创建了子主题并复制了woocommerce的文件。现在,我想实现该页面的自定义html代码 这是我的自定义代码 <section id="aboutus-section" class="content-section"> <div class="container"> <div class="row">

我想在产品页面上显示我的自定义html代码,我已经创建了子主题并复制了woocommerce的文件。现在,我想实现该页面的自定义html代码

这是我的自定义代码

<section id="aboutus-section" class="content-section">
                <div class="container">
                    <div class="row">
                        <div class="main-title">
                            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                                <h1 class="text-uppercase">ART BY MONA LIND</h1>
                                <h3>$150 - <a herf="https://www.definitepossibilities.com/hosting-clients/monalind/checkout/"> Checkout</a></h3>
                                <hr/>
                            </div>
                        </div>
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                            <img class="img-responsive pull-right" style="margin-left: 20px; margin-bottom: 15px;" src="https://www.definitepossibilities.com/hosting-clients/monalind/wp-content/uploads/2018/07/Abstract-2-1.jpg" alt="Capturing  the light  and  the  natural  elements  of  life." />
                            <p>Art is a diverse range of human activities in creating visual, auditory or performing artifacts (artworks), expressing the author's imaginative, conceptual idea, or technical skill, intended to be appreciated for their beauty or emotional power. </p>
                            <p>Many argue that art cannot be defined. ... Art is often considered the process or product of deliberately arranging elements in a way that appeals to the senses or emotions. 
                                <br/> It encompasses a diverse range of human activities, creations and ways of expression, including music, literature, film, sculpture and paintings.
                                <br/><a herf="https://www.definitepossibilities.com/hosting-clients/monalind/checkout/"> Purchase this for $150</a>

                                </p>
                        </div>
                    </div>
                </div>
            </section>

添加你的代码你只需要把你的html放在这里,这里的人会帮你解决错误,但不会给你完整的代码。所以,首先展示你们为实现这一点所做的努力。我很乐意提供帮助,但我需要首先了解几件事:你们是不是每个产品都只有一张图片?结帐链接您希望它的功能是什么?当客户单击该链接时,他们将立即重定向到购物车中只有一个项目的结帐?所以你不想允许购买多件物品?@kashlo。嗨,谢谢你帮助我。我希望所有产品都有不同的形象。我想用一个项目直接检查产品。
<?php defined( 'ABSPATH' ) || exit;

/**
 * Hook: woocommerce_before_single_product.
 *
 * @hooked wc_print_notices - 10
 */
do_action( 'woocommerce_before_single_product' );

if ( post_password_required() ) {
    echo get_the_password_form(); // WPCS: XSS ok.
    return;
}
?>
<div id="product-<?php the_ID(); ?>" <?php wc_product_class(); ?>>

    <?php
        /**
         * Hook: woocommerce_before_single_product_summary.
         *
         * @hooked woocommerce_show_product_sale_flash - 10
         * @hooked woocommerce_show_product_images - 20
         */
        do_action( 'woocommerce_before_single_product_summary' );
    ?>

    <div class="summary entry-summary">
        <?php
            /**
             * Hook: woocommerce_single_product_summary.
             *
             * @hooked woocommerce_template_single_title - 5
             * @hooked woocommerce_template_single_rating - 10
             * @hooked woocommerce_template_single_price - 10
             * @hooked woocommerce_template_single_excerpt - 20
             * @hooked woocommerce_template_single_add_to_cart - 30
             * @hooked woocommerce_template_single_meta - 40
             * @hooked woocommerce_template_single_sharing - 50
             * @hooked WC_Structured_Data::generate_product_data() - 60
             */
            do_action( 'woocommerce_single_product_summary' );
        ?>
    </div>

    <?php
        /**
         * Hook: woocommerce_after_single_product_summary.
         *
         * @hooked woocommerce_output_product_data_tabs - 10
         * @hooked woocommerce_upsell_display - 15
         * @hooked woocommerce_output_related_products - 20
         */
        do_action( 'woocommerce_after_single_product_summary' );
    ?>
</div>

<?php do_action( 'woocommerce_after_single_product' ); ?>