Hello!
I’m using print_custom_field but it returns nothing!
Here’s my code:
<?php
$Q = new GetPostsQuery();
$args = array();
$args['post_type'] = 'whitepaper';
$args['post_status'] = 'publish';
$args['orderby'] = 'ID';
$args['limit'] = '8';
$results = $Q->get_posts($args);
foreach ($results as $r):
?>
<a href="<?php print_custom_field('whitepaperFile:get_post','_wp_attached_file'); ?>" class="download" title="Download">Download</a>
<?php endforeach; ?>
Although if I try to print the custom field, it shows a number, which I believe it’s the unique ID.