Woocommerce Default Product Page - Sort / Order by Category - wordpress

Ok, So I got a woocommerce shop with different categories, lets say these are: shirts, pants and shoes.
Now I got a different page for each category, but I also have the Main Product Page where all of the products are shown. I can change the order the items to things like lets say: Popularity or Price.
But the problem is, I want to sort products to be of the same category below eachother on the Main Product Page. So like when you go to the Main Product Page where all the products are, they are shown in this way when you scroll down: first all shirts, then all pants, then all shoes.
I cant find any options or any solutions on the internet... how can I do this? To me it sounds like common sense to have to want products sorted in that way, yet I cant find a way to do it.
Anything would help, like: a plugin, custom css or php file changes..
O yeah before I get to mention, the order by category must also be the main sorting / order.
Hope someone can help :O :O

Related

I need 2 separate purchase buttons on product page ----> one for simple and one for variations

I am totally stumped in figuring this out and I think I am doing too many extra things in order to fix a simple issue. (I hope)
I am an artist, and I am selling prints and am also offering the original piece for sale on my website. I am trying to figure out how, on the single product page, to add a SEPARATE button that allows the customer to purchase the original piece. I tried adding it as a variable but it is not user friendly and other selections disappear if customers want to go back and select other print options. I do not want the option to purchase the original piece mixed in as a variable. I want it totally separate.
I have created drop down pages for prints and originals on my main site menu but it is messing up when the base ‘shop’ page is clicked because doubles pop up for each product- one is presented as a range in price (the prints) and the other is what the original costs. It is confusing and looks terrible. On top of that, when I try to upload/add new art pieces to either the ‘prints’ or ‘original work’ categories, they don’t show up on either page, they only show up on the ‘base’ shop page.
Is there ANY way to simplify this into removing the ‘prints’ and ‘original works’ subcategories and only have my base ‘shop’ page to display each product, BUT adding a button for the option to ‘purchase original’ along with ‘purchase prints’ on the actual single product page? I have been looking for answers for weeks and haven’t found anything.
Please help!! Thank you so much in advance! I have no clue what I am doing!!!
I have tried adding the 'original' piece into the variations menu and it didn't work correctly. I created subcategories for 'originals' and 'prints' but that is making my base shop page display double products, and when I upload new products and put them in their correct category, they dont go onto those pages, they stay on the base page.
I just want a 'Purchase Original' <---- simple product and a 'Purchase Prints'<----- variable product with size/material options.

Wordpress advanced taxonomy(category) filtering in post-types

I'm using Wordpress as an headless CMS/REST. For a post I got different kind of categories, these are divided by three main categories, each having other categories linked to one of these three parents. With the standard filtering options I found on the website.
What's possible now is to query a post and enter the category id of either of these sub-categories and it will retrieve all posts linked to them. What I'm trying to find is a way to query first posts that both have these sub-categories, instead of just all the posts that either have one of those. Second, (if it's possible) it can only query one sub-category of each the parent-category.
Hope it's a bit clear. What's possible now is that I can query all the posts linked to one categories, but I can't exclude them if they don't have the same one (and if it's possible, exclude choosing more then one sub-category of one main category).
If anyone has an idea how to do this by making a custom function or with a plugin, please let me know, thanks!

My Woocommerce shop page doesn't show correctly. Products are not arranged in similar pattern?

My shop page look like this https://ibb.co/bBfEdF
It is showing like this here because some products have long product name & some have short. In the same way some products are having price mentioned and some are without price.
I have tried so many thing but couldn’t figure it out to set it automatically in same pattern, when I am making changes in the CSS files the changes are modifying other pages too, so I need to resolve this by without affecting other pages.
Can I set product names to be displayed always in one single line, weather the name is too short or long.
Either can I fix the box size for each row so that it look like similar for each product along with name.
Its one of Woocommerce flaws. The fast solution is to give the product titles a similar word count

WooCommerce Product Category Widget Behaviour (navigating to products)

I am very new here and hope I am going about this write. I searched topics but could not find one specifically about this.
I can't give a link to this because the site is in maintenance mode so I am going to try to explain it the best I can.
I have WooCommerce Product Category Widget setup as a sidebar navigation for a complex category setup.
I have:
Show hierarchy Only show children of the current category
Both checked on.
This works great when people are navigating the categories. But, as soon as they click on a product and it goes to a product page, the hierarchy closes in the sidebar. I'd like to still see those subcategories open while on the product page.
I can't turn off the Children option because, while it's a partial solution, the the entire complex tree is showing at all times and it's just way too big.
Is there some method to keep that hierarchy open once you go to a product page?
Thanks for any info.

Wordpress WP E-Commerce plugin max number of categories

I'm adding product categories dinamically by code and it all works great (importing products from xml file), but for some reason when i get 46 product categories i cannot add anymore automatically and i can't find any reason why this happens.
The 47th category is added to the database and has all the needed information just like all others. It just doesnt appear in the product categories, and therefore not in the site's menu aswell. The confusing things are:
It appears in the "Appearance > menu" listing with correct relationship with his parent
The product categories says it lists 47 items but i can only count 46
The 47th only appears if i delete all categories
The query that shows product categories is correct
What is going on here? Can any one give me some clue about where should i search to fix this?
Thanks in advance.
Finally i found the problem.
First, the problem had nothing to do with maximum number of categories or any sort of category limitations. It was a caching bug.
In my specific case, i added 46 terms at once and the plugin created a cache that holds all the children from my taxonomy. Later when i tried to add the 47th term, it was actually added correctly, but the cache was never updated for some reason and it's the reason for all the trouble.
The solution: Clear that cache by deleting the {$taxonomu}_children option.
delete_option("{$taxonomy}_children");
More on this:
inserting-terms-in-an-hierarchical-taxonomy

Resources