Finally solve the problem:
t1.taxonomy = 'product_cat' AND p1.post_status="publish" AND terms1.term_id IN (".$args['categories'].") AND
t2.taxonomy = 'product_tag' AND p2.post_status="publish"
In the functions.php
t1.taxonomy = 'category' AND p1.post_status="publish" AND terms1.term_id IN (".$args['categories'].") AND t2.taxonomy = 'post_tag' AND p2.post_status="publish"
rename category
to product_cat
, and post_tag
with product_tag
.
Related Posts:
- List products from current category
- Is There a Difference Between Taxonomies and Categories?
- How can I allow commas in tag names?
- What is the difference between a “tag” and a “category”?
- WooCommerce: List All Categories
- Can’t custom taxonomies have same terms (slugs) as categories?
- How to display non-hierarchical taxonomy as terms with checkboxes?
- How do the ‘tag’ and ‘category’ (default) taxonomies do ‘save_post’ action?
- Control term order on a per-post basis
- get all tags from category
- 404 Error On Category and Tags Pages
- Combine two taxonomies in a hierarchical tree
- Checklist of selected categories
- Rewrite URL with category and tag combined using WP_Rewrite
- How to tax query X number of posts related by tag first, then by category if not enough in tag-related
- Woocommerce product categories order [closed]
- Use tag interface for hierarchical taxonomy?
- Sort posts by tags in category pages
- How to search for categories and/or tags?
- Using URL parameters, list posts from category and custom taxonomy
- How to get the url to tag & category base set by the user?
- Filter categories using tags
- Sticky posts on home page, search, tag and archives without plugin
- Are Categories, Tags and Custom Taxonomies any different in regards to SEO?
- Category and tag with same name
- Create subdomains for tags and categories
- In the tag archive – display count of posts for each category they belong to
- Is it possible to disable certain user roles from creating tags?
- Automated adding of one tag to all the posts in a category
- Moving Categories submenu to Media, but still opens Posts menu
- Exclude most recent posts from specific category in wp_query()
- When using get_categories or similar, is it possible to filter results that contain certain Tags as well?
- How to split the categories of subcategories with thumbnails
- How to totally get rid of Category in my blog?
- Root level category, tag, author and archive pages to work
- Showing all the posts in one page?
- WooCommerce – Display product child categories from specific parent
- Categories and Tags returning 404 on the sidebar when using ugly permalinks
- Deleting All tags except categories Wp database
- Is it possible to put tags and category information in the post as text?
- How to order categories in Woocommerce that are spread over multiple pages? [closed]
- Script to duplicate categories as tags
- How to add categories to products in woocommerce programatically? [closed]
- Search by word, category, tag, author
- Remove Categories and Tags from Admin Dashboard
- How to filter tags by category?
- Count how many posts have a specified tag AND category
- How to prevent tag “iframe” from being deleted from the heading description of rubric?
- Hide specific category tag on single post page
- Filtering posts in category by tag URL
- echo $category[0]-> cat_name; shows only one category name
- How to show entries related to main category
- Automatically create tags and merge with categories
- When creating category, it creates automatically tag, or, when creating tag, it creates automatically category in same name
- Using heirarchial tags or Custom taxonomies
- How to assign Categories and tags inside the TinyMCE Editor for each Image?
- Re-coding category-template.php to go to custom URL
- Balance Tags to the_content Words Length
- Category and tag urls return 404 error
- custom browse by
- Search by tag, category and author without plugin
- Limit Category/Tag Dropdown To blog_id in Multisite Install With Global Categories/Tags
- How to echo Tags and Categories as plain text
- Categories and Tags Conflict after Woocommerce Installation
- How can I add metaboxs to Admin Bar?
- Split posts into 2 separate streams
- Tag Menu items based on their categories
- How to add an “All” category to the tag cloud?
- Exclude posts with certain tags in category archive
- Hide category name using mod_rewrite
- Getting Post Tags From Certain Categories
- How to exclude category and post_tag taxonomy while displaying custom taxonomy?
- 404 error when i try to search by category or by tag
- How to remove specific categories from tag archives?
- Unable to get all tags from specific categories
- Page Type with Category Link
- A simple question regarding tags and categories
- Display related posts with same category or same tag return blank
- How can I allow people to ‘subscribe’ to categories?
- How to add an empty entry to masonry?
- Own Custom Tags/Category page ( posts)
- htaccess redirect for all categories converted to tags now showing 404
- Loops in category description
- How to create a category or tag available exclusively to the admins and not to the users?
- altering theme – content generated by PAGES not PORTFOLIO
- Tracking multiple tags or categories
- How to load jquery tag-it plugin into admin?
- Search tag within category
- Modify functions.php to add a term ‘uses-theme’ set to theme name on post save
- WordPress “Categories to tag converter” not working on imported Blogger posts
- Query posts that have all the specified tags
- Display all subcategories for a product category in woocommerce
- Narrow Down a Shop Page Results Based on a Product Tag in WooCommerce
- WooCommerce Product Search Error
- Add product category to post_class
- Moving Blog and Changing URL
- In my wordpress admin panel Suddenly The Category, tag and featured Image Option are not showing
- Category and tags are not working properly
- Error while add Category or Tag in WordPress
- How to display posts from a specific tag in the current category on a single page