Skip to content

Instantly share code, notes, and snippets.

@justinrains
Last active January 18, 2022 16:23
Show Gist options
  • Select an option

  • Save justinrains/6ade8979e415332dab2ec9580fd3c024 to your computer and use it in GitHub Desktop.

Select an option

Save justinrains/6ade8979e415332dab2ec9580fd3c024 to your computer and use it in GitHub Desktop.
<?php
$args = array (
'post_type' => 'pp_questions',
'meta_key' => 'order_number',
'orderby' => 'meta_value_num',
'order' => 'ASC',
'posts_per_page' => -1,
);
?>
<form method="post" id="download_form" action="">
<input type="submit" name="download_csv" class="button-primary" value="<?php _e('Download the log (.csv)', $this->localizationDomain); ?>" />
</form>
<?php
$custom_posts = get_posts($args);
foreach($custom_posts as $post) : setup_postdata($post);
?>
<tr>
<td scope="col" class="tenpct"><?php echo get_post_meta($post->ID, 'order_number', true) ?></td>
<td scope="col" class="tenpct"><?php echo the_ID(); ?></td>
<td scope="col" class="question"><?php echo the_title(); ?></td>
</tr>
<?php endforeach; ?>
</table>
@justinrains

Copy link
Copy Markdown
Author

Thanks so much if you can help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment