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.”
- How do I ensure that post_type and Taxonomy use the same slug?
- Is it possible to add custom badges to product attributes conditionally, based on custom field?
- Woocommerce Custom Meta Boxes- How to only display if they actually have content
- I found this code to be very useful, how can I change it to a text that display “Product versions and period of last update” rather than a button?
- Customise Grouped Product display in Woocommerce with custom column
- ACF – Retrieve custom taxonomy from a relationship field
- Customizing woocommerce product page
- How to get Previous Visited Page Information
- Woocommerce custom archive page custom content and shortcode
- 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?
- customer specific email attachment
- Simple custom attributes on posts
- Use a custom page with dynamic content as a user profile page
- Style WooCommerce Product Search Widget
- Product page not found if product data is set Appointment Service
- ACF unable to use user field
- How to get the full product name by ignoring custom modification on it
- 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
- Need to add custom text field to Woocommerce under add to cart button
- Moving Quantity after product description
- 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
- I want to use a product thumbnail completely different than the product image
- Including a Customized Initialize File with a wordpress header
- Remove Custom metabox from particular page template is used
- Replace publish date in blog module with custom field
- Send default WooCommerce email when switching from custom order status
- ACF Custom field not showing in Timber Taxonomy page
- How to Remove wpautop in woocommerce includes folder class-wc-order-item.php
- WordPress search form and search result through ACF field in custom taxonomy
- How do I enable the text editer in my WordPress theme? [closed]
- Style Radio Buttons inside Edit Page (Custom Fields)
- How to add H1 Tag on Homepage?
- WooCommerce – Adding custom HTML to specific product pages
- Add commentmeta custom field to every published comment with SQL
- Does WordPress support template resources/custom fields
- Change post template the proper way
- How do I change text of a product template in a WooCommerce theme? [closed]
- ACF Shortcode bringing in my shortcode is adding unnecessary line breaks
- Customize TinyMCE Buttons
- Custom Import with taxonomies
- Add image custom attribute [closed]
- WooCommerce customise checkout billing form [closed]
- 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
- woocommerce display product category on checkout page [closed]
- Insert a custom field as a second email address to a completed order in WooCommerce
- Advice how to connect custom database with WordPress, change data in WordPress and finaly use this data
- Change the User/ Author of the Products
- Show total sales for each products on search results page Woocommerce
- acf_form() – “On Update” action [closed]
- Change in credit card payment button for woocommerce
- Custom Sort Order for Custom Post Type Taxonomy
- How to display product variations on same row
- Custom product sorting archive page
- Add custom information in editor summary
- Custom fields in the billing address section woocommerce
- Customise “Add a New Post” page
- Add a custom field for sorting the products in a specific category WOOCOMMERCE – Second try
- Add a custom field for sorting the products in a specific category WOOCOMMERCE
- woocommerce, add free sample button on product page
- Can’t change WordPress / WooCommerce attribute value order
- Taxonomy question how to add more data
- Add File field in WooCommerce Box office plugin
- next/previous stays within specific taxonomy term when in single post
- Need to add custom cart item data
- How to capture number input from wordpress form into acf field in woocommerce
- Querying a meta field on a custom taxonomy archive