简体   繁体   中英

Wordpress woocommerce empty my account + car page

I am stuck when trying to install woocommerce. I add managed to do it, but suddenly, I don't know why, the "my account" page and "cart" page are empty, if I look into the source code, the content is here but between and therefore invisible. I have no idea and have been searching for hours on internet and stackoverflow with no luck! Has anyone an idea of why this is doing this?

I have re-installed three times the plug-in, deleted everything and reinstalled it, it sill does the same error....

在此处输入图片说明

I haven't touched anything in the code and the pages are chosen in the backend

在此处输入图片说明

EDIT : My woocommercePage is

<?php get_header(); ?> 
<?php woocommerce_content(); ?> 
<?php get_footer(); ?> 

And my page is :

   <?php get_header(); ?> 
<?php if (have_posts()) : while (have_posts()) : the_post(); ?> 
<?php endwhile; ?> 
<?php else : ?>
 <?php endif; ?> 
<?php get_footer(); ?>

The WooCommerce "My Account" and "Cart" pages should just be regular WordPress pages. The WooCommerce functionality is added by using shortcodes in the page content. You may also include other content and shortcodes if you would like, but the following shortcodes are required.

For the Cart use:

[woocommerce_cart]

And for My Account use:

[woocommerce_my_account]

Your page template will need to make a call to the_content() so that the $post->post_content value is passed through the the_content filter which will call do_shortcode() to process the shortcodes.

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

<!-- output the page content here to process shortcodes -->
<?php the_content(); ?>

<?php endwhile; ?> 
<?php else : ?>
 <?php endif; ?> 
<?php get_footer(); ?>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM