WooCommerce-产品内容再次在描述框中循环

时间:2018-07-12 08:29:06

标签: wordpress woocommerce

由于我已经更新到WooCommerce版本3.4.3,所以我的单个产品页面两次显示内容。一次在正确的位置,第二次在说明框中。

有问题的页面: https://salascatering.nl/product/sate-menu/

模板:

<?php
/**
 * The Template for displaying all single products
 *
 * This template can be overridden by copying it to yourtheme/woocommerce/single-product.php.
 *
 * HOWEVER, on occasion WooCommerce will need to update template files and you (the theme developer).
 * will need to copy the new files to your theme to maintain compatibility. We try to do this.
 * as little as possible, but it does happen. When this occurs the version of the template file will.
 * be bumped and the readme will list any important changes.
 *
 * @see         http://docs.woothemes.com/document/template-structure/
 * @author      WooThemes
 * @package     WooCommerce/Templates
 * @version     1.6.4
 */

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

get_header( 'shop' ); ?>
<section class="page-title">
    <div class="row">
        <div class="small-12 columns">
            <h1>Webshop</h1>
        </div>
    </div>
</section>
<div class="row content">
        <div class="small-12 medium-8 columns">
            <?php
                /**
                 * woocommerce_before_main_content hook.
                 *
                 * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
                 * @hooked woocommerce_breadcrumb - 20
                 */
                do_action( 'woocommerce_before_main_content' );
            ?>

                <?php while ( have_posts() ) : the_post(); ?>

                    <?php wc_get_template_part( 'content', 'single-product' ); ?>

                <?php endwhile; // end of the loop. ?>

            <?php
                /**
                 * woocommerce_after_main_content hook.
                 *
                 * @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content)
                 */
                do_action( 'woocommerce_after_main_content' );
            ?>

        </div><!-- #content .site-content -->
        <div class="small-12 medium-4 columns"> 
            <?php
                /**
                 * woocommerce_sidebar hook.
                 *
                 * @hooked woocommerce_get_sidebar - 10
                 */
                do_action( 'woocommerce_sidebar' );
            ?>
        </div>  
    </div><!-- #primary .content-area -->
<?php get_footer( 'shop' ); ?>

WooCommerce状态:

`
### WordPress Environment ###

Home URL: https://salascatering.nl
Site URL: https://salascatering.nl
WC Version: 3.4.3
Log Directory Writable: ✔
WP Version: 4.9.7
WP Multisite: –
WP Memory Limit: 256 MB
WP Debug Mode: –
WP Cron: ✔
Language: nl_NL
External object cache: –

### Server Environment ###

Server Info: Apache
PHP Version: 7.0.30 - We raden je aan om PHP-versie 7.2 of hoger te gebruiken voor betere prestaties en beveiliging. Hoe je PHP-versie bijwerken
PHP Post Max Size: 128 MB
PHP Time Limit: 120
PHP Max Input Vars: 5000
cURL Version: 7.38.0
OpenSSL/1.0.2l

SUHOSIN Installed: –
MySQL Version: 5.5.5-10.1.30-MariaDB-1~jessie
Max Upload Size: 128 MB
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ✔
DOMDocument: ✔
GZip: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔

### Database ###

WC Database Version: 3.4.3
WC Database Prefix: wp_
MaxMind GeoIP Database: ✔
Totale databasegrootte: 13.06MB
Database datagrootte: 10.83MB
Database index grootte: 2.23MB
wp_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB
wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB
wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB
wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.05MB
wp_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB
wp_woocommerce_order_itemmeta: Data: 0.08MB + Index: 0.06MB
wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB
wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.05MB
wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB
wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.05MB
wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB
wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB
wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB
wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB
wp_commentmeta: Data: 0.02MB + Index: 0.03MB
wp_comments: Data: 0.02MB + Index: 0.09MB
wp_links: Data: 0.02MB + Index: 0.02MB
wp_options: Data: 1.06MB + Index: 0.05MB
wp_postmeta: Data: 2.52MB + Index: 0.44MB
wp_posts: Data: 0.36MB + Index: 0.16MB
wp_smush_dir_images: Data: 0.02MB + Index: 0.03MB
wp_termmeta: Data: 0.02MB + Index: 0.03MB
wp_terms: Data: 0.02MB + Index: 0.03MB
wp_term_relationships: Data: 0.02MB + Index: 0.02MB
wp_term_taxonomy: Data: 0.02MB + Index: 0.03MB
wp_usermeta: Data: 0.06MB + Index: 0.03MB
wp_users: Data: 0.02MB + Index: 0.05MB
wp_vtprd_purchase_log: Data: 0.02MB + Index: 0.02MB
wp_vtprd_purchase_log_product: Data: 0.02MB + Index: 0.02MB
wp_vtprd_purchase_log_product_rule: Data: 0.02MB + Index: 0.02MB
wp_wc_download_log: Data: 0.02MB + Index: 0.03MB
wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB
wp_wfBadLeechers: Data: 0.02MB + Index: 0.00MB
wp_wfBlockedCommentLog: Data: 0.02MB + Index: 0.00MB
wp_wfBlockedIPLog: Data: 0.02MB + Index: 0.00MB
wp_wfBlocks: Data: 0.02MB + Index: 0.02MB
wp_wfBlocks7: Data: 0.02MB + Index: 0.05MB
wp_wfBlocksAdv: Data: 0.02MB + Index: 0.00MB
wp_wfConfig: Data: 0.39MB + Index: 0.00MB
wp_wfCrawlers: Data: 0.02MB + Index: 0.00MB
wp_wfFileChanges: Data: 0.02MB + Index: 0.00MB
wp_wfFileMods: Data: 2.52MB + Index: 0.00MB
wp_wfHits: Data: 1.02MB + Index: 0.22MB
wp_wfHoover: Data: 0.02MB + Index: 0.02MB
wp_wfIssues: Data: 0.02MB + Index: 0.06MB
wp_wfKnownFileList: Data: 1.52MB + Index: 0.00MB
wp_wfLeechers: Data: 0.05MB + Index: 0.00MB
wp_wfLiveTrafficHuman: Data: 0.02MB + Index: 0.02MB
wp_wfLockedOut: Data: 0.02MB + Index: 0.00MB
wp_wfLocs: Data: 0.02MB + Index: 0.00MB
wp_wfLogins: Data: 0.11MB + Index: 0.03MB
wp_wfNet404s: Data: 0.02MB + Index: 0.02MB
wp_wfNotifications: Data: 0.02MB + Index: 0.00MB
wp_wfPendingIssues: Data: 0.02MB + Index: 0.06MB
wp_wfReverseCache: Data: 0.02MB + Index: 0.00MB
wp_wfScanners: Data: 0.02MB + Index: 0.00MB
wp_wfSNIPCache: Data: 0.02MB + Index: 0.05MB
wp_wfStatus: Data: 0.14MB + Index: 0.09MB
wp_wfThrottleLog: Data: 0.02MB + Index: 0.02MB
wp_wfVulnScanners: Data: 0.02MB + Index: 0.00MB
wp_yoast_seo_links: Data: 0.02MB + Index: 0.02MB
wp_yoast_seo_meta: Data: 0.02MB + Index: 0.00MB

### Post Type Counts ###

acf: 1
attachment: 396
nav_menu_item: 12
page: 18
post: 22
product: 19
product_variation: 17
revision: 140
shop_order: 39
vtprd-rule: 1
wccpf: 1
wpcf7_contact_form: 3

### Security ###

Secure connection (HTTPS): ✔
Hide errors from visitors: ✔

### Active Plugins (18) ###

WooCommerce added to cart popup (Ajax): door XootiX – 1.3 – Niet getest met de actieve versie van WooCommerce
Advanced Custom Fields: door Elliot Condon – 4.4.12
CC & BCC for Woocommerce Order Emails: door Dario Curasì – 1.4.1 – Niet getest met de actieve versie van WooCommerce
Check and Enable GZIP compression: door Richard's Toolbox – 1.1.11
Combine CSS: door Convoy – 2.0
Contact Form 7: door Takayuki Miyoshi – 5.0.2
Force Regenerate Thumbnails: door Pedro Elsner – 2.0.6
Multiple content blocks: door Trendwerk – 3.2.2
Post Types Order: door Nsp Code – 1.9.3.9
Really Simple SSL: door Rogier Lankhorst – 3.0.2
Regenerate Thumbnails: door Alex Mills (Viper007Bond) – 3.0.2
Remove Category URL: door Valerio Souza – 1.1.2
Simple Lightbox: door Archetyped – 2.7.0
UpdraftPlus - Backup/Restore: door UpdraftPlus.Com
DavidAnderson – 1.14.11

WooCommerce: door Automattic – 3.4.3
Wordfence Security: door Wordfence – 7.1.8
Yoast SEO: door Team Yoast – 7.7.3
Smush: door WPMU DEV – 2.7.9.1

### Settings ###

API Enabled: ✔
Force SSL: –
Currency: EUR (€)
Currency Position: left
Thousand Separator: .
Decimal Separator: ,
Number of Decimals: 2
Taxonomies: Product Types: external (external)
grouped (grouped)
simple (simple)
variable (variable)

Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
exclude-from-search (exclude-from-search)
featured (featured)
outofstock (outofstock)
rated-1 (rated-1)
rated-2 (rated-2)
rated-3 (rated-3)
rated-4 (rated-4)
rated-5 (rated-5)


### WC Pages ###

Winkelbasis: #5 - /winkel/
Winkelmand: #6 - /winkelmand/
Afrekenen: #7 - /offerte-overzicht/
Mijn account: #8 - /mijn-account/
Algemene voorwaarden: ❌ Pagina niet ingesteld

### Theme ###

Name: Salas Catering
Version: 1.0
Author URL: http://www.anotherconcept.nl
Child Theme: ❌ – Als je wijzigingen aanbrengt in WooCommerce of in een hoofdthema dat je niet zelf gebouwd hebt
raden we het gebruik van een child thema aan. Zie: Hoe maak je een child thema

WooCommerce Support: ❌ Niet aangegeven

### Templates ###

Overrides: salas-theme/single-product.php
`

文件:content-single-product.php(从/ plugins / woocommerce / templates /中粘贴):

<?php
/**
 * The template for displaying product content in the single-product.php template
 *
 * This template can be overridden by copying it to yourtheme/woocommerce/content-single-product.php.
 *
 * HOWEVER, on occasion WooCommerce will need to update template files and you
 * (the theme developer) will need to copy the new files to your theme to
 * maintain compatibility. We try to do this as little as possible, but it does
 * happen. When this occurs the version of the template file will be bumped and
 * the readme will list any important changes.
 *
 * @see     https://docs.woocommerce.com/document/template-structure/
 * @package WooCommerce/Templates
 * @version 3.4.0
 */

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' ); ?>

如何使我的产品正确显示?

谢谢!

0 个答案:

没有答案