0

I'm new to Wordpress, so apologies if this is a silly question.

I am using the WP Download Manager Pro plugin to upload PDF's to wpdmpro post types. A user has to enter an email address in order to download.

In loop.php I loop through all wpdmpro post types and a specified category and tag

<?php
query_posts(array(
    'post_type' => 'wpdmpro',
    'wpdmcategory' => $category->category_nicename,
    'tag' => $cat_tag
));
?>

Now, I want to loop through each post and access the download link attached to post, but I have no idea how to do this? The docs don't seem to outline this anywhere???

<?php if (have_posts()): ?>
    <?php while (have_posts()): the_post(); ?>
        // ... how can i access the download link on the post here?
    <?php endwhile; ?>
<?php endif; ?>

I have tried...

<?php the_content(); ?>

and

<?php 
$post = get_post(); 
$content = apply_filters('the_content', $post->post_content); 
echo $content;  
?>

I am at a loss here!

Any help would be greatly appreciated!

0

You access the file direct link this way:

<?php echo (wpdm_get_package(get_the_ID()))['download_url']; ?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.