D
D
Danil2018-08-02 13:52:13
WordPress
Danil, 2018-08-02 13:52:13

Why products are not displayed when integrating Woocommerce into a Wordpress template?

Good afternoon everyone.
Actually, here's the thing:
When adding woocommerce_content(); in theme files, products are not displayed on the page for some reason.
It turns out this:

<h1 class="page-title">Магазин</h1>
  <ul class="products columns-4">
    (тут должен выводиться список товаров, но тут просто пустота)
  </ul>

When switching the topic to any other - everything immediately becomes ok.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Orkhan Hasanli, 2018-08-03
@azerphoenix

Hello!
1) Have you enabled Wocomer support for your theme?
2) there should be a woocommerce.php template where you output woocommerce_content()
3) also note that for the WC to work correctly (for styles, for example), you need to add body_class() to the tag
https://developer.wordpress.org/reference/function ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question