WP Alchemy Meta Loop
iamdangavin Apr 5th, 2012 146 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- <?php $mb->the_field('video_featured'); ?>
- <input type="checkbox" name="<?php $metabox->the_name(); ?>" value="featured"<?php if ($metabox->get_the_value()) echo ' checked="checked"'; ?>/>
- global $scout_video_featured;
- $args = array(
- 'post_type' => 'scout_video_cpt',
- // must use meta_query as an array with WP 3.1+ (instead of meta_key or meta_value)
- 'meta_query' => array(
- // only works if 'mode' => WPALCHEMY_MODE_EXTRACT is used for $custom_metabox in functions.php
- 'key' => $scout_video_featured->get_the_name('video_featured'),
- 'value' => 'featured',
- 'compare' => 'LIKE'
- $slides = new WP_Query($args);
RAW Paste Data