Skip to content

Instantly share code, notes, and snippets.

@KimBranzell
Last active August 29, 2015 14:15
Show Gist options
  • Save KimBranzell/30b8ee4b1d848dc92b4e to your computer and use it in GitHub Desktop.
Save KimBranzell/30b8ee4b1d848dc92b4e to your computer and use it in GitHub Desktop.
For when you want to loop and display posts based on the value of a checkbox.
<?php
$args = array(
'meta_key' =>'your_checkboxkey',
'meta_value'=>'1'
);
$the_query = new WP_Query( $args );
?>
<!-- Loop continues here -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment