No sidebar on product category (woocommerce) page - woocommerce

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);") );

Related

Category pages blank, but shop works on WooCommerce on WordPress

At some point, we don’t know when, category pages stopped showing anything other than the header/footer of the page. This isn’t for just one category, but all categories and sub-categories.
The main store page, and products, display fine. For example, this is a product page.
https://thesmartspacer.com/product/conference/
But, when you click on one of the categories in the breadcrumb path, you get a blank page.
Similarly, if you click on any category at:
https://thesmartspacer.com/product-category/
Nothing comes up — blank page (except header/footer).
Even categories with only products in them (e.g., no subcategories), same result:
https://thesmartspacer.com/product-category/uses-and-applications/banquet-and-events/
I’ve tried disabling all the plugins that were added at any point in recent history … or that I suspected could impact categories, including Yoast and Yoast Premium. But, pages category and subcategory pages are still blank.
Ideas? I’m just baffled and if I cannot figure this out, I’m going to need to cleanse the site of categories so it’s functional … which is drastic, and I don’t want to go there.
Help!
Thanks!
Neil
Your site is showing the following error
thesmartspacer.com/:426 GET https://thesmartspacer.com/wp-content/themes/Divi/core/admin/fonts/modules.woff net::ERR_ABORTED 404 (Not Found)
check why link is not working
thesmartspacer.com/:426 GET https://thesmartspacer.com/wp-content/themes/Divi/core/admin/fonts/modules.woff
or
Try following solution, it's on divi theme
Refer: https://divi.help/threads/ttf-module-is-slowing-down-the-page.3062/
So that others benefit from the answer that took me days to figure out...
This answer only applies to products displaying, not categories and subcategories.
We found from elegant themes that the theme template had gotten changed (I believe overwritten by a global for the default), and that there needs to be a specific WooCommerce category template that has NO body defined for the template.
So that this is documented for others, see:
When using divi with theme templates, and WooCommerce, you must have a specific cateogry template with an empty body
If you use templates for a theme, WooCommerce will NOT display categories unless there's a specific template set up for WooCommerce category pages that removes the body.

WooCommerce does not show sub categories

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>

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 shop page does not display header and footer

I'm having an issue with woocommerce so I'm making this themes everything well well expect the shop page which does not display header and footer area all other pages do.Does anyone know what is the problem
Please check this code is available or not
get_header( 'shop' ); archive-product.php
in your theme woocommerce folder or plugin woocommerce folder.

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