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?
- Sub Field of File Field
- ACF – Compare user and post data
- Login Api with Meta_key and Meta_value
- ACF plugin and field update
- Advanced Custom Fields deleting some code and adding code for a slider
- Save input form on custom field
- Filter Term By Parent Term – Custom Post Type
- issue with saving custom metaboxes fields
- Filter By Term Not Working – Custom Post Type
- Retrieving and inserting data in custom fields
- How to add custom fields to images for image source text and URL
- Counting number of images from loop
- Page template is missing fields or is invalid when I updating the template
- User custom meta delete by serialised key value
- Display current taxonomy slug in a post
- Metabox value for post loop?
- Adding fields to attachment – only shows when inserting new attachments
- qtranslate-x problem with custom term description
- Resize $term attachment using url
- Displaying the Taxonomy and a Queried Term on a taxonomy.php page?
- How to Manage and link certain custom taxonomy?
- Order categories by sum of custom fields
- how to modify a field’s size in a metabox : ROWS height, and scroll control?
- Saved Post Meta Array Returns as String
- How to add content with a filter when there’s no content in the editor
- Login_form add to top of form rather then bottom
- meta_query ‘compare’ => ‘!=’ not working
- WordPress add taxonomies/terms list as a menu in archive page
- Advanced Custom Fields from Category – IF statement
- Check for meta data before it is published
- Query Multiple meta
- If metabox fields has content display content
- I have a form with a custom button ,i want to add the field data to an database when clicking the custom button
- taxonomy terms are not populating select tag options
- Stop truncation of shortcodes in custom text fields?
- Delete custom meta
- custom field images do not display until page save
- How to check custom fields from functions.php
- Save custom post data outside of default post form
- display custom media folders to wordpress media popup
- Should I store arrays in custom fields or create custom tables?
- Get custom field outside wordpress loop on new php page
- Retrieving Advanced Custom Field within Shortcode Function [closed]
- Query Posts based on custom field value
- How to format the various types of custom fields?
- Problem saving meta data
- How to properly get popular Posts by multiple Values
- Admin – Search Events by a custom field
- How to add a default field Name to post Custom Fields
- Get file size from ACF repeater field
- Automatically set the_post_thumbnail to Custom Field Value
- create a custom field that let me include other posts
- Display List of Categories Within a Custom Taxonomy
- What is the earliest hook you can piggyback on to check terms/taxonomy for a collection view?
- Append custom field items to content from plugin
- Redirecting to an external URL
- Check if value exists before saving
- Echo out custom fields in comments
- Using ACF Custom Field value in a URL with do_shortcode() [closed]
- Get meta value when the page is a blog archive
- How to filter a taxonomy meta field to the ‘single_term_title’ filter hook
- Saving and using Custom Field in user settings/profile “Checkbox list”
- Why WordPress takes time to make request to save post?
- Text in header as a page – hide from Web crawlers
- Custom Metabox Always shows box and checked
- Show comon custom field results?
- Search one custom field?
- Can’t save meta field value if the title not set
- How to display terms from two taxonomies in one php code?
- Create custom query for search?
- No results for taxonomy archive page
- Add Image With Changeable Link in Custom Field [closed]
- add_action priority and taxonomy used in plugin
- update_user_meta(): invisible data storage
- Get a different meta value with ajax when different elements are clicked
- Extend WP_User_Query or WP_User to return all custom fields?
- Display Data From This Custom Media Upload Meta Box?
- Quicktag button to automatically add a custom field to a post