Skip to content

Instantly share code, notes, and snippets.

@ckahle33
Created May 14, 2014 22:17
Show Gist options
  • Save ckahle33/ea77a3f91f9051635aa8 to your computer and use it in GitHub Desktop.
Save ckahle33/ea77a3f91f9051635aa8 to your computer and use it in GitHub Desktop.
// Get the data if there is any.
$downloadtype = get_post_meta($post->ID, '_downloadtype', true);
// Echo out the field
echo '<h2 style="margin-bottom: 0;">Download Type</h2>';
echo '<select name="_downloadtype" class="wide">
<option value="public <?php selected( $downloadtype, "public" ); ?>Public Download</option>
<option value="registered <?php selected( $downloadtype, "registered" ); ?>Registered Download</option>
</select>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment