1,208 questions
1
vote
0
answers
147
views
Some woocommerce products are not showing with isotope filter
I'm listing products in WooCommerce using the isotope filter. However, if a product is linked to two categories, it's not listed. Those linked to a single category are fine. I have no idea. Could you ...
1
vote
2
answers
129
views
On woocommerce search custom taxonomy doesn't work with 'relation' => 'AND' but it works with 'relation' => 'OR'
I am trying to build search for woocommerce. I am using woocommerce 9.7 and latest wordpress. And the search i want is with multiple taxonomies (categories) so I registered 2 more taxonomies on top of ...
2
votes
2
answers
141
views
How to list all visible products for specific product category in WooCommerce
I want to simply display all products for a specific product category [e.g. "smart-shoes" term slug] on my WooCommerce website. I only want visible products in that category listed.
Here is ...
2
votes
1
answer
81
views
Limit product attributes displayed terms in WooCommerce product lists
I'm using code that displays attributes in the product list, archive and category page.
/* Show attributes in the product card */
add_action( 'woocommerce_shop_loop_item_title', '...
0
votes
0
answers
32
views
Fetch product attributes from products with specific product categories and echo min and max values of these in archive template
I'm trying to fetch specific product attributes from 'simple' products residing in specific categories.
The attributes are numbers (pa_volume) and depending on what category the product is in, the ...
1
vote
0
answers
89
views
Modify main WordPress query to limit results to a list of possible Post IDs
I am working on a WprdPress/WooCommerce plugin feature where specific Customers are shown only a subset of Products.
The user has a meta data field with an array of post ids corresponding to the ...
1
vote
1
answer
52
views
Replace the brand with a different category above product in WooCommerce catalog
My WooCommerce store is set up so that a product brand is displaying above the title, as in the screenshot below:
I've more recently set up products to display brand in their actual title. In the ...
0
votes
0
answers
16
views
WordPress Search for custom taxonomy field
I have two post types, Authors and Books. There is a custom taxonomy named 'Genre' in 'Books' post type . I am trying to add custom search functionality. It's working well with the rest(like - keyword,...
0
votes
0
answers
57
views
How to correctly display woocommerce product variations in catalog?
On my woocommerce store I want to display product variations on the shop page and other catalog/archive pages like category page, etc.
I am using pre_get_posts hook to modify $query as below but some ...
1
vote
1
answer
51
views
How Display All Posts from the "Services" Taxonomy on the Service page?
I'm currently building my first wordpress theme and I want to display a custom post type's taxonomy (but only the name, not the link) on its preview as well as the date it was published. I've been ...
0
votes
1
answer
283
views
Custom Post Type Taxonomy Filter is Not Working in Admin Dashboard
I have added a custom post type called movies to my WordPress site, along with a custom taxonomy called genres. The end goal was to enable filtering of movies based on genres in the WordPress admin ...
2
votes
2
answers
150
views
How to use a custom taxonomy term name as meta_value in a get_posts query
I am stuck with something which I am sure is simple, but I cannot find an answer online.
I have two custom post types ('walks' and 'features') which I am trying to query using a code number which is ...
1
vote
1
answer
106
views
Create shortcode to show specific nav menu depending on product category
I need to create a shortcode that displays a specific wordpress menu on a Woocommerce product depending on the category the product belongs to. Both the category and menu are identified by ID but I ...
1
vote
0
answers
89
views
Woocommerce: how to quickly and correctly get the total amount of sales for each taxonomy?
The site has a taxonomy: my_taxonomy. I need to get the total amount of sales for each custom product taxonomy, list for level 1 and for level 2, I mean it:
Level0
-level1 <-- this
--level2 <-- ...
1
vote
1
answer
136
views
Brands plugin switchover issue with custom code in WooCommerce
As part of my WooCommerce store, we were using a plugin to facilitate product brands. We originally had a third-party one called YITH Brands. It worked for a while, but it doesn't integrate well with ...
1
vote
1
answer
88
views
Display specific product attribute description in WooCommerce single product page
I have attribute "Details" and one of the values of this attribute - "Oversize". This value have description "Please note, this model runs large. We recommend ordering a size ...
0
votes
1
answer
44
views
Assign Custom Taxonomies to a Custom Post When its Created, Dependant on the Options Chosen on the Form
I'm using ACF to generate new custom posts from a form submission made by WP User Frontend.
It's generating the post and populating the fields as intended, but on the form, there are 8 different radio ...
0
votes
0
answers
167
views
Include custom taxonomy created via ACF in Woocommerce product search
I created a book store and created "Author" taxonomies using advanced custom fields.
I would like to improve my product search results on Woocommerce. Now it's like an author's books only ...
0
votes
2
answers
311
views
Custom post type uses same categories as post-type instead of a unique list
I have a WordPress site where I'm using the Post Type section for it's purpose as a blog but also have a custom post type (Composers) that I want to create categories for. the code I have includes the ...
1
vote
0
answers
170
views
Display a list comma separated taxonomy terms with "and" as final separator in Wordpress
I'm trying to output a list of custom taxonomies on Wordpress where the final separator is an &.
I have three potential taxonomies a post could be in: Category 1, Category 2, and Category 3. Some ...
0
votes
1
answer
179
views
How can I solve Fatal error: Cannot redeclare function... in a wordpress shortcode function
`I need to display nested child taxonomies and list its posts.
This is what I am trying to get
Its working, but I need to use the fuction as a shortcode. Getting "Fatal error: Cannot redeclare ...
0
votes
1
answer
238
views
pods: Query custom posts, filtered by hierarchical taxonomy
We have provided some of our PODS types with categories that are organized hierarchically. Similar to the example “Hierarchical Taxonomy: Cuisine” here.
To display the PODS entries, we use the ...
1
vote
1
answer
429
views
Add a metabox to admin WooCommerce Product if it has specific product tag
I am really struggling with WooCommerce PHP. This time I am simply trying to see if a product post has a tag before continuing to add a custom metabox. The code is written into functions.php of the ...
0
votes
1
answer
180
views
How to manually change the order of appearance of a custom taxonomy on a Wordpress post?
I have a custom taxonomy for authors for each post, it's basically a bank of publications and resources. I've used "get_the_terms" to display them and it's working perfectly! However I can't ...
0
votes
1
answer
34
views
Sort your own taxonomy alphabetically
I have created a taxonomy that displays authors on a page. I created an additional "Last Name" field to sort authors by last name.
Authors are displayed divided into groups according to the ...
0
votes
1
answer
56
views
Sort taxonomies by surname rather than name
I have created an Authors taxonomy. Each author has a name and surname in the name field. Later on the taxonomy page, the list is displayed in alphabetical order.
<?php
$taxonomy = '...
0
votes
1
answer
212
views
Woocommerce check if product attribute has archive enabled or disabled
I am trying to optimize my cache, and I need to check whether a product attribute has archive page enabled or not. If not, I don't need to purge the cache for that term's url.
Currently, my caching ...
1
vote
1
answer
115
views
Add disabled attribute to taxonomy's alphabetical pagination items when no terms exist in the group
I have a custom taxonomy alphabetical pagination to list terms by first letter.
function alpha_pagination() {
$array = array(
'A' => __('A',''), 'B' => __('B',''), 'C' => __('C',''),
...
1
vote
1
answer
1k
views
Create a custom taxonomy for WooCommerce without a plugin
I want to create custom taxonomy for WooCommerce.
The default taxonomy is category and tag, however, I want more, for example, brands, materials and more.
For instance, I want Nike, Adidas... to be ...
1
vote
1
answer
256
views
WooCommerce display Product Attributes on shop page compatible with multi-language
I have managed to change WooCommerce to Show attributes on the shop page.
however, my site is multi-language, how can I make this function multi-language?
add_action( '...
0
votes
0
answers
62
views
How to create custom taxonomy page? or custom archive page of custom taxonomy?
I am using WooCommerce plugin.
I have this custom taxonomy under a product called "Merk".
$labels = array(
'name' => _x('Merk', 'taxonomy general name'),
'...
3
votes
1
answer
85
views
Disable Woocommerce order completed email when order items have specific product tags
I'm using the following code, but it's not working, WooCommerce is still sending emails when the order changes from processing to completed for those two product tags.
add_filter( '...
1
vote
1
answer
696
views
How to limit the number of terms in WordPress custom taxonomy terms page
I'm creating theme for movies and TV series. So I have CPT named 'series' and custom Taxonomy named 'shoof_series' and custom terms(categories) for each series. when I created page template to display ...
1
vote
2
answers
88
views
How to display specific content in WooCommerce product subcategories
I'm using code that needs to display specific content on different category pages.
My categories have the following structure:
Man
Cloth
Shorts
Shorts with pockets
But the code below, displays ...
1
vote
1
answer
196
views
Adding a shortcode form in WooCommerce Category pages only
I'm looking to add a contact form to appear under the contents of the WooCommerce Category pages only - not to appear in the product pages. I'm using the following code to display the form:
add_action(...
0
votes
1
answer
128
views
How to get custom taxomony from post-meta in Woocommerce?
I'm having some issue's trying to display the term from a custom taxonomy in WooCommerce.
Currently, I already utilise WooCommerce Product Categories, so I created a custom taxonomy called sale_type
...
1
vote
1
answer
295
views
Get all simple products that have global product attribute brand in WooCommerce
In woocommerce I's trying to retrieve all products that have global attribute brand. from my prior understandings and also some googling I have done this so far:
function handle_custom_query_var($...
-1
votes
1
answer
109
views
Get the product attributes for variations from WooCommerce variable product
For a WC plugin I'm working on, I need to find the attribute that defines the variations of a product.
So, suppose we have a variable product that has attributes likes Color, Size, Material, but only &...
-2
votes
1
answer
66
views
WooCommerce custom taxonomy page filter
I am editing the taxonomy template, say taxonomy-brand.php, but within this page I'd like to add a set of clickable categories to filter the list of products.
So, if I have a brand of Adidas for ...
0
votes
1
answer
150
views
Wordpress custom taxonomy - wp_set_object_terms creates taxonomy duplicates?
We are building a small plugin for adding custom posts to our website. These posts have 'attributes' like categories. These posts come from an external feed. When adding a new posts we want to add a ...
0
votes
1
answer
523
views
Assign wordpress custom taxonomy category into custom post type
I've been working for a custom form that insert post into custom post type in wordpress. I need to assign a custom taxonomy categories with this post.
Here is the custom taxonomy registered -
// ...
0
votes
1
answer
69
views
How to Look Up Custom Taxonomy Value by Post_id and Update Table Using Mysql
I've been working on this for hours, but can't figure it out. Long story short, I'm working on a Wordpress site and imported about 1M listings so far for various professionals. They're organized based ...
2
votes
1
answer
760
views
SQL query for Woocommerce products: Get sku and product tag
With a SQL query I want to get all products with the products SKU and product tag ID, product tag name (but not product category.
I tried the following code, but I don't know how to query product tag ...
2
votes
1
answer
325
views
Add a divider between subcategories and products in WooCommerce loop
I need to add divider line or Elementor template between products and subcategories in main category WooCommerce.
I separated it but I cannot add divider
I used this code with Elementor template short ...
1
vote
1
answer
2k
views
Renaming existing Custom Taxonomy slug and labels in WordPress
I am trying to rename a custom taxonomy from a purchased theme on WordPress. I have successfully renamed the slug from "Director" to "Instructor" with the below code in my ...
1
vote
2
answers
211
views
Hide product categories from WooCommerce search
I Need help please I have to hide Multiple product categories from my WordPress, WooCommerce, search and admin, This Coding is not working for me at all:
function exclude_product_categories( $q ) {
...
0
votes
0
answers
88
views
Display a limited amount of product attributes through shortcode on Wordpress
I really need some help to solve this issue.
I already have a working code which displays all the product attributes in a table form through shortcode on my product page. The code is as follows:
...
0
votes
0
answers
75
views
How do you create a taxonomy for a product search engine by ingredients for WooCommerce?
I want to create a search engine for ingredients for allergy sufferers.
Unlike regular search engines that look for products related to the words you enter, this Search Engine will find the products ...
-1
votes
1
answer
82
views
Wordpress get_terms & wp_query shows wrong results
I do have subpage where I want to present & filter job postings for my clients company.
The filtering is based on two taxonomies:
job-category (examples: logistics, hr, marketing etc); filtering ...
0
votes
2
answers
438
views
WordPress count posts on archive pages
I have this shortcode which displays total number of posts from a custom taxonomy, but I need it to work on Archive pages, so if I don't put an ID to the shortcode, it doesn't display.
function ...