OK, got it
<?php
$types = get_terms(
'tvr_amenity',
array(
'parent' => '0',
'hide_empty' => 1
)
);
foreach( $types as $type ) :
$myname = trim($type->name);
$meta = get_option('amenity_sticky');
if (empty($meta)) $meta = array();
if (!is_array($meta)) $meta = (array) $meta;
$meta = isset($meta[$type->term_id]) ? $meta[$type->term_id] : array();
$value = $meta['is_sticky'];
if(!$value) continue; /* skip term if is_sticky not checked */
?>
<p>
<input type="checkbox" name="apartment_amenity[]" value="<?php echo $type->term_id ?>" class="tvr_amenity"> <?php echo $myname ?>
</p>
<?php endforeach; ?>
Related Posts:
- List custom queried terms in the edit-tags.php?taxonomy page
- Term specific featured post on taxonomy archive pages
- Create taxonomy terms from custom field values
- Best way to programmatically remove a category/term from a post
- Attaching Metadata to a Taxonomy Item
- How to add upload field in a custom taxonomy?
- How to save taxonomy term meta?
- Default WordPress taxonomy (Tag) – How to add a custom field to form and save it to the database
- List custom taxonomy terms from custom field
- get_posts that match a user-specified value on a page
- List taxonomy term “Last Name” + “First Name” (taxonomy custom field) in a post loop
- Display list of terms having the same custom field value
- Querying posts by latitude and longitude to build a Google Maps with several markers
- tax query between operator like
- Best way to sort estates and query them (for rent? yes/no. contains office space? yes/no)?
- get_field values for each post on home page using wp_add_inline_style
- update_term_meta() only updating once on certain meta keys
- Save Taxonomy of Post via custom Taxonomy Select Dropdown
- Show Custom Taxonomy as Headline for related posts
- Why can’t I get the correct post permalink
- WordPress taxonomy child image
- How to add an ACF only for parent term?
- Is There a Difference Between Taxonomies and Categories?
- How to add a custom field in the advanced menu properties?
- Underscores in custom fields
- Add custom field to the archive page?
- Need small coding with Custom Fields Search
- Adding Custom Field to Taxonomy Input :Panel
- Unable to get Preview of Uploaded image within a Custom Meta box
- How to store the value of a custom field dropdown select for post referencing?
- How to filter or search the posts using postmeta tables custom meta fields with wordpress REST API
- Custom bulk action for media gallery items
- Localized Date Format for Custom Field
- Check if the value of a field has changed on save_post
- Add custom taxonomy under the category title
- Saving custom image meta fields
- Echo values from custom field outside loop php
- Have a Custom Post Type index page display taxonomy items instead of posts
- List Terms in Category
- Transfer self made functions.php custom fields to Advanced Custom Fields [closed]
- Complex WP_User_Query call fails on production server
- Query post order by post and desc not working
- If category then echo a custom fields
- Auto Populate Custom Field with Complex Value That Increase by One?
- Display custom field if it exists and has a specific value [closed]
- Displaying a checkbox array from advanced custom field
- Display custom field values from posts on frontpage
- WordPress: custom field display twice
- meta_compare seems to be treating values as strings instead of integers as expected
- Is there any way to get all meta and standard columns for any WordPress object after searching based on meta key and value
- How to add fetchpriority parameter to images in the media library?
- Editable custom field in WP Admin Dashboard
- Customizing user data
- Trying to sort and display categories(not posts) by custom field: ‘order’
- Show user info in a hovercard [closed]
- WordPress implode & wp_insert_post question
- Shortcode To Display Post Custom Field Value in Post Title, Post Content
- edit_tag_form_fields is depricated but tag_edit_form_fields doesn’t work
- Iterate through users and display users meta info at front-page
- Getting the Featured image URL and inserting it as Custom Field on Post update / publish
- Adding custom field and querying from post table
- How to display a product features dynamically with icons?
- Update custom field values on edit address page woocommerce
- Is there a (sane) way to get all custom fields for a post, which do not have a leading underscore?
- Custom field image to Featured Image
- Show array of meta_value in Edit Post Coloum
- How can I query all post with currrent taxonomy term?
- custom filed from post in the side bar
- Working with multiple values and metaboxes
- Unable to select image with custom field
- WordPress how to prevent URL encoding in URL of taxonomy terms
- Rewrite comment form post ID on submit
- How to use custom slug and custom templates for custom taxonomy?
- Move the metaboxes to the very top of post editor
- How to use the Term Object from a custom select field in a query
- WordPress Rest API custom field not updating till i manually update the post
- search based on custom field
- Why isn’t update_post_meta saving?
- Custom Fields not working properly
- Custom fields multiple commas separated values
- Display taxonomy loop using custom field data
- How do I display a custom field in an existing form on the front end?
- Add custom field information to source meta data
- How to save array option as text and not integer?
- Delete custom meta
- Display custom fields only if it has a value
- Add nofollow to custom field link and make domain exceptions?
- wordpress simple post multi rating with post_meta and user_meta
- Custom fields are not displaying in page with multiple loops
- Add class from custom field into widget class
- Get multiple posts with some custom fields efficient
- Echo used hierarchical taxonomies parent name
- Adding custom field to Lightbox in header only pulls current page data, not Lightbox item data
- Meta boxes not displayed, data isn’t being saved
- Custom fields / meta box output
- Get single image from custom fields made with WCK custom fields creator
- How to add google map to custom field
- How can i put a custom field inside this php
- Truncating characters in Advanced Custom Fields works some places but not others?
- WordPress taxonomy and terms question