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
- Get value in custom field with taxonomy [closed]
- Remove Category description textarea
- Custom Fields and performance
- pagination in woocommerce order history page
- Add field to posts (checkbox) that only one post can have
- generate unique number when registering a user
- Allow Users to Set Password During Registration
- Create a Custom menu item fetched by Product Categories and Sub Categories
- Disable email field on WooCommerce customer account details
- 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?
- Show post page only if the user has bought a specific product
- Add attribute / custom attribute to product in woocommerce
- redirect product-category to a custom page
- Woocommerce Product page edit
- How to redirect WooCommerce shop URL?
- Send a custom WooCommerce email when custom order change [closed]
- Change WooCommerce product price based on category and GEO IP country
- Retrieve value of a category’s custom field
- Custom Taxonomy to dropdown box on adminside wordpress
- How to add contents of a custom field to a taxonomy term list?
- Viewing checkout page removes fees from mini cart
- woocommerce_checkout_fields modifying existing billing_phone label created new field
- how do I remove the shipping from woocommerce thankyou page and from the email
- help to change some colors (woocomerce and store locator) [closed]
- WooCommerce – Adding Custom Fields To Invoice
- Search Tool only refreshes Page without showing results
- Display value of custom field of custom taxonomy in single post?
- Best structure for entering recipes in a WordPress theme?
- Changer numbers of columns in woocommerce shop
- Toggle custom fields?
- How to print Array values of custom Fields Meta?
- “woocommerce_form_field()” function having issues after latest woocommerce update [closed]
- how to make a custom field readonly or disabled by user role?
- Rename WooCommerce sorting dropdown options [closed]
- How to create “custom page types” with different custom fields in them?
- WooCommerce custom billing fields on email address
- Woocommerce custom checkout form
- Woocommerce custom field calculation
- Add attribute taxonomy through code don’t appear in admin product page
- wordpress shortcode not working
- How to auto add nofollow to links in custom field?
- Get A Custom Field From A Custom Taxonomy Of A Custom Post Type [closed]
- How can I output the custom fields wrapping with HTML
- 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
- Customise Grouped Product display in Woocommerce with custom column
- ACF – Retrieve custom taxonomy from a relationship field
- Woocommerce custom archive page custom content and shortcode
- customer specific email attachment
- 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
- Moving Quantity after product description
- Custom product status get filtered on all product list views
- Woocommerce – Remove cart button depending product (post) status
- 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
- 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 to add H1 Tag on Homepage?
- 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]
- Custom Import with taxonomies
- Add image custom attribute [closed]
- WooCommerce customise checkout billing form [closed]
- woocommerce display product category on checkout page [closed]
- Insert a custom field as a second email address to a completed order in WooCommerce
- Show total sales for each products on search results page Woocommerce
- acf_form() – “On Update” action [closed]
- Customise “Add a New Post” page
- Add a custom field for sorting the products in a specific category WOOCOMMERCE
- Can’t change WordPress / WooCommerce attribute value order
- Taxonomy question how to add more data
- Add File field in WooCommerce Box office plugin
- Need to add custom cart item data