Is it possible to add custom fields to a WooCommerce attribute term? [closed]

Yes, it is possible. And there’s an easy guide here. Below is a working code you can add to the theme’s main functions.php file: // Adds a custom rule type. add_filter( ‘acf/location/rule_types’, function( $choices ){ $choices[ __(“Other”,’acf’) ][‘wc_prod_attr’] = ‘WC Product Attribute’; return $choices; } ); // Adds custom rule values. add_filter( ‘acf/location/rule_values/wc_prod_attr’, function( $choices … Read more

Assign posts to taxonomy terms instead of the taxonomy terms to posts?

I think the “Featured Post Manager” plugin will be closer to what you’re looking for: http://wordpress.org/extend/plugins/featured-post-manager/screenshots/ The language used is somewhat confusing, and it may not work for custom taxonomies (directories) or custom types (people), BUT you can probably take the code and customize it to work for those classes of things instead, as well … Read more

Using multiple taxonomies to sort Custom Posts

Part of your trouble likely stems from the fact that you’re using the legacy version of the get_terms() function. As per the docs for this function: Since 4.5.0, taxonomies should be passed via the ‘taxonomy’ argument in the $args array: $terms = get_terms( array( ‘taxonomy’ => ‘post_tag’, ‘hide_empty’ => false, ) ); Therefore, we can … Read more

How to pass URL parameters for advanced taxonomy queries with multiple terms for one custom taxonomy

After adding print_r($wp_query); to my template and examining the results, I have discovered URL formats that work. I wrote, in my question, that the following format doesn’t work — in fact, it does – if you spell your custom taxonomy name correctly. example.com/?ctxname=term1+term2 Pretty URLs with the ‘+’ and ‘,’ operators (indicating AND and OR … Read more

Custom Taxonomy and Tax_Query

First of all, you run register_post_type on init and register_taxonomy on after_setup_theme which is called after init. This means your custom taxonomy will not be available when registering the post type. I would suggest you remove the taxonomies keyword from the register_post_type arguments array, and just register the taxonomy manually afterwards. In your example code … Read more

How to add images to taxonomies?

Starting from WordPress 4.4, you can use add_term_meta function to store metadata for a term. This is basically a key-value pair information which is stored in wp_termmeta table. Original Answer(Prior to WP 4.4) WordPress doesn’t have the option to add extra information to taxonomies. There isn’t any taxonomy_meta table. So, you have two options. Create … Read more