daily pastebin goal
76%
SHARE
TWEET

WP Alchemy Meta Loop

iamdangavin Apr 5th, 2012 146 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php $mb->the_field('video_featured'); ?>
  2. <input type="checkbox" name="<?php $metabox->the_name(); ?>" value="featured"<?php if ($metabox->get_the_value()) echo ' checked="checked"'; ?>/>
  3.  
  4. <?php
  5. global $scout_video_featured;
  6.         $args = array(
  7.         'post_type' => 'scout_video_cpt',
  8.         // must use meta_query as an array with WP 3.1+ (instead of meta_key or meta_value)
  9.         'meta_query' => array(
  10.                 array(
  11.                 // only works if 'mode' => WPALCHEMY_MODE_EXTRACT is used for $custom_metabox in functions.php
  12.                 'key' => $scout_video_featured->get_the_name('video_featured'),
  13.                 'value' => 'featured',
  14.                 'compare' => 'LIKE'
  15.                 )
  16.         )
  17.         );
  18. $slides = new WP_Query($args);
  19.  
  20. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top