The meta is within the taxonomy (so I have the standard, category name, slug, description etc and then I added a collectable tickbox to the category itself not the post/product)
I solved this by Running a query for all sub categories and then I put an if statement in so it shows only categories with the collectable box ticked.
(used toolset for the custom field in the end)
$parent_id = 16;
$args = array(
'hierarchical' => 1,
'show_option_none' => '',
'hide_empty' => 0,
'parent' => $parent_id,
'taxonomy' => 'product_cat'
);
$subcategories = get_categories($args);
);
foreach ($subcategories as $category) {
$st_var = $category->to_array();
$thumbnail_id = types_render_termmeta("collectable",array("term_id" =>$st_var['term_id']));
if ( $thumbnail_id ) {
/// Put my html here, category name, image, link etc
}
}
Related Posts:
- Hide custom field if empty
- list/consult Taxonomy only for the respective author/creator in dashbboard
- Custom protected password page with ACF
- Custom column sorting in WordPress admin post table
- Advanced Custom Fields: Sorting custom columns with custom fields sorts only by date
- How to add textarea field to taxonomy (tag)?
- How to add an extra button on woocommerce shop page and use it to send the product info with image in a mail? [closed]
- Woocomerce custom billing address fields display in order details [closed]
- Redirect to another page using contact form 7? [closed]
- What requirements for ACF custom fields key and name properties?
- Get users based on month ACF datepicker field
- Upload advanced custom field text link array with csv
- Save And Display Mp3 Audio files on WooCommerce product page with Dokan
- how to override woocommerce specific loop or archive-product.php [closed]
- Get all products with a custom attribute
- Get value in custom field with taxonomy [closed]
- Creating custom Woocommerce attribute taxonomies from a plugin
- Remove Category description textarea
- How to remove Profile Picture section or the message “You can change your profile picture on Gravatar.”
- Custom Fields and performance
- WordPress Search documentation: how to improve search query using taxonomy terms, custom meta fields?
- pagination in woocommerce order history page
- Add field to posts (checkbox) that only one post can have
- generate unique number when registering a user
- How to get value from custom backend menu
- Show attribute description when filtering by that attribute
- Create a Custom menu item fetched by Product Categories and Sub Categories
- Auto add taxonomy if post has category
- Get Custom Field Values by Another Custom Field in WordPress
- Passing page url into a custom field via the Press-This bookmarklet
- How to extend nav-menu-item-control data in Appearance > Customize?
- Add attribute / custom attribute to product in woocommerce
- Outputting an array of term meta values in a custom WooCommerce tab?
- Woocommerce Product page edit
- Setting up Different Layouts for Each Product Category and Subcategory [closed]
- Change WooCommerce product price based on category and GEO IP country
- Automatically Update Woocommerce Prices [closed]
- Loop through custom fields with similar label / common chars in label
- Retrieve value of a category’s custom field
- Custom Taxonomy to dropdown box on adminside wordpress
- Add custom field to woocommerce variations [closed]
- how to get the categories for a single product in a hierarchical way
- CPT Loop with ACF and passing ID between Loops
- How to change popular term checklist title when edit post?
- Viewing checkout page removes fees from mini cart
- Add a date updated/date modified option using custom fields
- woocommerce_checkout_fields modifying existing billing_phone label created new field
- How to create a dropdown select of all items in an ACF field group
- help to change some colors (woocomerce and store locator) [closed]
- No shipping method has been selected [closed]
- WooCommerce – Adding Custom Fields To Invoice
- Display value of custom field of custom taxonomy in single post?
- WordPress implode & wp_insert_post question
- Woocommerce product permalink not working
- Get wordpress taxonomy slug name(s) to use as div class
- What is the best way to modify Admin Panel on WordPress?
- How to customize shipping region/states on WooCommerce
- Rename WooCommerce sorting dropdown options [closed]
- Woocommerce custom checkout form
- Add attribute taxonomy through code don’t appear in admin product page
- Hiding Short Description in Shop Page, WooCommerce
- theme customizer – can a single option pass multiple values?
- Let author add field to metabox by pressing a button
- Get A Custom Field From A Custom Taxonomy Of A Custom Post Type [closed]
- How can I output the custom fields wrapping with HTML
- How do I ensure that post_type and Taxonomy use the same slug?
- Customizing woocommerce product page
- How to get Previous Visited Page Information
- optimal taxonomy or custom post types
- WordPress category custom title
- WP_Query – sort the results by meta value custom attribute wocoomerce
- No plugin populate user information in to form
- How can Use custom input field in functions.php page?
- Use a custom page with dynamic content as a user profile page
- ACF unable to use user field
- where is admin footer?
- Can I overwrite custom taxonomy FROM “public” TO “false”
- Woocommerce custom “My Account” Tab – Add Save button
- Display Custom Field or Custom Taxonomy in front page /post/product
- Taxonomy template is not reading
- ACF – Can’t get custom post type by taxonomy
- Custom product status get filtered on all product list views
- Can we add an extra button on woocommerce shop page and use it to send the product info including image in a mail?
- Adding a drop-down (select tag) option under Menu Settings in WordPress Admin
- Woocommerce – Remove cart button depending product (post) status
- WordPress Performance and bulk edits
- Send default WooCommerce email when switching from custom order status
- ACF Custom field not showing in Timber Taxonomy page
- How do I enable the text editer in my WordPress theme? [closed]
- Style Radio Buttons inside Edit Page (Custom Fields)
- WooCommerce – Adding custom HTML to specific product pages
- Change post template the proper way
- ACF Shortcode bringing in my shortcode is adding unnecessary line breaks
- How ACF Advanced Custom Field works with Woocommerce Single Product [closed]
- Integrate Woocommerce to a custom theme
- Need help saving input fields for Security Deposit plugin in WC Vendors page
- Show total sales for each products on search results page Woocommerce
- acf_form() – “On Update” action [closed]
- Custom product sorting archive page
- Add custom information in editor summary