Search code examples
wordpresswoocommercewordpress-shortcode

WooCommerce pages showing as blank


The cart, my-account and checkout pages are all blank when I try view them. All I get is the header and footer. All I have done so far is download WooCommerce, go through the settings and add theme support. My shop page wasn't working until I added theme support but now thats the only page that does. Also I've noticed that if I use WooCommerce shortcode in my php files I can get the pages. But the shortcode doesn't seem to be working in the backend. BTW I'm using my own custom theme incase thats relevant.

What can I do to fix this?

update: This must be an issue with my theme as if I set one of the default ones to active all the WooCommerce pages show. But I don't know what my themes issue is yet.

update: I have noticed that the WooCommerce pages are allowing me to add templates to them, apart from the shop page which is working. Why is this happening? enter image description here


Solution

  • There are few steps to do.

    First turn on debug, by switching WP_DEBUG to true.

    View source of page, and check if everything is being rendered, and also check console for JS error.

    At last, for theme, if after switching to default theme, content shows up, there is a theme related issue.

    Check for missing templates or template parts or structure within related with page from which content is missing and compare it with default themes templates and template parts.

    See if there is some template part missing, or modified, like content.php or content-page.php, the_content() , etc.