Woocommerce settings effect on page layout - wordpress

when I set woocommerce setting for shop to display categories. the layout is ugly yet when the same setting is display products.the layout is fine. how can I have a good layout with display categories option set?

If I understand the question correctly, you want to display categories among the products in the archive view.
If that is the case, you should use the content-product_cat.php template in wp-content/plugins/woocomemrce/templates/. Copy this template into your theme's woocommerce folder(create it if it does not exist).

Related

Elementor (Wordpress): how to add category specific content for categories based on elementor template?

I have a question related to Elementor page builder for wordpress.
We have category archive pages for a certain custom post type. These categories are using an Elementor template (which you can find in the side menu on Templates -> Theme Builder ).
So each category archive page is fully dynamic. It displays a list of posts belonging to the category in dynamic way.
But what if I want to add a text for this particular category? Where/how can I do that?
In "Edit category" page, you can't add changes that will affect the design content, and there is no Elementor builder available there.
So I would need a way to define a text field in the template, but then it needs to show up on "Edit category" somehow.
Is there a solution for this?
to do that - all you need is create a custom field group as normal. But in the location setting, chose taxonomy equal to your custom post type as show in below picture.

Display Woocommerce widgets on normal pages

Is it possible to display woocommerce widgets on pages that are not part of Woocommerce?
You can probably find a plugin to do this, but if you want to get your hands a little dirty you can do a bit of theme development work (you might want to do it as a child theme first though)
You can create a template page https://developer.wordpress.org/themes/template-files-section/page-template-files/
and then include a wigitised area on that page
https://codex.wordpress.org/Widgetizing_Themes

Woocommerce Products and Category pages have different templates from other WC pages

I have a website that is using WooCommerce to sell items. Here is my demo site:
http://demo.bergdahl.com/
You can see the ecommerce pages and their layouts here:
Layout 1 (left and right sidebars):
Products list: http://demo.bergdahl.com/shop/
Category page: http://demo.bergdahl.com/product-category/catridges/
Layout 2 (right sidebar only):
Single product page: http://demo.bergdahl.com/product/6-oz-catridge/
I have gotten it so that most of the WooCommerce pages use have layout 1 except the single product page that has layout 2. Layout 2 is set to be the default layout in the theme and applies to the other 170 pages of the site. I don't want to change the default layout, I just want to find out what page I can use to set the layout for the single product page.
Basically, I would like to have all WC pages use layout 1.
My question is, how does WooCommerce chose which layout is assigned to which type of page?
It seems like the Product list and the Category pages are pulled in from the blog page layout. The Cart, Checkout, and My Account pull from their actual pages. I am not sure how to set the layout in the single product page.
P.S. - This site uses an older theme with no WC support. I don't know if this may be the problem but I could only adapt the theme by using the woocommerce_content() method listed here: https://docs.woocommerce.com/document/third-party-custom-theme-compatibility/?utm_source=notice&utm_medium=product&utm_content=themecompatibility&utm_campaign=woocommerceplugin
You can override the singe product template.
To override the single product template, copy:
wp-content/plugins/woocommerce/templates/single-product to
wp-content/themes/Builder/woocommerce/single-product
There is an official documentation for WooCommerce theme override at Template Structure + overriding templates via a theme.
Thanks to Lax, I found a way around it. I actually used the woocommerce.php that I created out of my theme's page.php. This got it out of the same container that the product was in.
I then used the dynamic_sidebar('sidebar_name_here') to display the sidebar on that page . The full code I used was:
<?php if(is_product()){?>
<div class="store-sidebar-left">
<?php dynamic_sidebar('store-sidebar-left');?>
</div>
<?php } ?>
This allows it to only show on the single product page.
I had one small problem where I couldn't find the name of the sidebar in my theme or my database so I just created a new on in my functions.php file and used that one.

How to display grouped products in a list with quantity in woocommerce?

I want to change the way grouped products are shown by two different versions of wordpress.
case 1: Wordpress 4.1.5 running WooCommerce 2.3.11 with custom theme.
case 2: Wordpress 4.2.2 running WooCommerce 2.3.11 with default theme.
I need to display grouped products (child products) in a tabular form with quantity box before it just like image2. Where do i need to make a change so i could achieve same in case 1? Why it is showing View all Products button instead of listing the products itself?
any help will be appreciated.
You can read about WooCommerce's template overrides. If you aren't seeing the default with your theme that means that your theme is overriding it.
I can't be sure, but probably you need to go into your theme's woocommerce folder.... and find the grouped.php template in:
yourtheme/woocommerce/single-product/add-to-cart/grouped.php
and rename it to anything else grouped-backup.php so that WooCommerce will stop using it.
If that doesn't work, then it is perhaps being hidden by CSS or by Javascript. I don't have enoug information to know and you should contact your theme's author.

Same widgets on each page Wordpress

How can i avoid same widgets on each page.I add widget on sidebar in widget area but it appears on all the pages having sidebar.I want different widgets on different pages sidebars.How can i do this.I am new to wordpress.
This can be done with the Jetpack plugin. Once activated you can choose what widgets display on what pages:
The Widget Visibility module enables you to configure widgets to appear only on certain pages (or be hidden on certain pages) by using the Visibility panel.
Visibility is controlled by five aspects: page type, category, tag, date, and author. For example, if you wanted the Archives widget to only appear on category archives and error pages, choose “Show” from the first dropdown and then add two rules: “Page is 404 Error Page” and “Category is All Category Pages.”
I prefer the Custom Sidebars plugin. It comes with less overhead than Jetpack, but if you need any of the other features Jetpack provides: go for it!
You can use the Display Widgets WordPress plugin. It is a super light weight plugin and will do exactly what you want!

Resources