WooCommerce does not show sub categories - wordpress

I installed WooCommerce. WooCommerce setup 5 pages like: Shop, Cart, Account, Privacy and Pay.
Everything works fine but WooCommerce shows only the main categories.
My settings in the WooCommerce dashboard set to show subcategories but nothing is happening.
How I can fix this?

If you switch to a default theme like Twenty Seventeen, do the sub-categories show up?
If so, I would suggest talking to your theme author.
If not, Try re-saving your products and categories and clearing the cache.

I solved the problem.
I added the woocommerce support in my theme.
Then I created a new page called woocommerce.php
In this fil you run a loop with woocommerce_content();
This line is required in div tags with class woocommerce.
This is important for the default style!
The file look like this
<div class=“woocommerce”>
<?php woocommerce_content(); ?>
</div>

Related

No sidebar on product category (woocommerce) page

I have searched the forum and found people wanting to get rid of the sidebar when on the product category page. My issue is the opposite and I have not found someone raising it (so hopefully, the solution is easy):
the sidebar shows OK on the (standard woocommerce) shop page (based on woocommerce.php template) but when I click a product category in the sidebar of that same shop page, the product category page (based on woocommerce.php template as well) has no sidebar.
Has someone come across this issue?
(WordPress 4.9.4, woocommerce 3.3.3 (same issue on 3.3.1)
Add the following code to your functions.php file, I would recommend that you use a child theme or plugin for this. That way you won't lose your modifications when the theme gets updated.
add_action('wp', create_function("", "if (is_archive(array('product'))) remove_action( 'woo_main_after', 'woocommerce_get_sidebar', 10);") );

Display Products for Woocommerce

I created a Wordpress page that must display the products that I've created using Woocommerce Plugin. It seems like it has it's own Shop Page so I tried to customize it (it has different template) but failed since I am just a beginner in Wordpress. So I tried making my own Wordpress page (just like what I said at the first line) having the same template with other menu options. So it's good. The problem is I cannot make the products show. So I searched and installed a Display Product for Woocommerce Plugin so that I can call the products, on the webpage that I created, using shortcodes. Unfortunately, there is no single products that shows in my page. Any suggestions with this?
Try using this Shortcode [products] on a new page. It showed me all the products i had in my woocommerce store.
Let me know if that fulfills your needs.

Woocommerce [woocommerce_cart] shortcode not working

So I'm working on this website and I'm using the woocommerce plugin.
The plugin is working fine and I can add things to my cart the only problem is that I can't view my cart. The image I've added shows my "Cart" page and you can see it just simply shows the shortcode.
http://gyazo.com/f0710eeb2fd63643bb74607988559e02
I have no idea why it isn't working :(
I found out what was wrong, I had to add this little bit of code in the page.php file:
<?php
echo apply_filters('the_content',$wp_query->post->post_content);
?>
Hope it will help anyone else too :)
I've come across this issue this week. I found that deleting the cart page and regenerating it with Woocommerce fixed it.
Go to Woocommerce > Settings > Utilities > "Create default WooCommerce pages"

Woocommerce menus on category pages

I'm creating a unique design for a Woocommerce webshop and I've run into a problem. I want the end-user to be able to add categories and also add custom menu's on those created pages.
Any of you guys have a brilliant idea how to do that? I thought I would put the wp_title() of the page in a variable and put the code for a menu on my category page-template with that variable, but that doesn't seem to be the solution. Any brilliant thoughts?
Extra info: the reason why my own solution will never work, is because you can't register the menu in your functions.php with a variable name..
The easiest method of doing this would be to create the pages you need for your nav and then add the WooCommerce shortcode to the page.
[product_category category="example" per_page="12" columns="4" orderby="date" order="desc"]

pagination not displayed in woocommerce plugin in wordpress

Navigation arrow keys for pagination are not displayed in products page. I have used woocommerce plugin in wordpress 3.4.2 version.
They will not be visible till you have enough products to have 2 or more pages.
Can't remember why this happens. I think its because wordpress posts per page is set to 'n' in your settings so woocommerce follows that setup (only showing 'n' number of products)
Anyway to fix it open your functions.php file and insert:
add_filter('loop_shop_per_page', create_function('$cols', 'return 4;'));

Resources