简体   繁体   English

WordPress woocommerce清空我的帐户+汽车页面

[英]Wordpress woocommerce empty my account + car page

I am stuck when trying to install woocommerce. 尝试安装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! 我不知道,一直在互联网和stackoverflow上搜索数​​小时而没有运气! 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 编辑:我的woocommercePage是

<?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. WooCommerce的“我的帐户”和“购物车”页面应该只是常规的WordPress页面。 The WooCommerce functionality is added by using shortcodes in the page content. 通过在页面内容中使用短代码来添加WooCommerce功能。 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. 您的页面模板将需要调用the_content()以便$post->post_content值通过the_content过滤器传递,该过滤器将调用do_shortcode()处理短代码。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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