Support » Plugin: Lana Downloads Manager » List of downloads

  • Resolved vrotmanh

    (@vrotmanh)


    I am trying to make a page with a list of downloads, but I don`t know how to filter or choose to show downloads.
    Can you help me?

    • This topic was modified 2 years ago by  vrotmanh.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Lana Design

    (@lanadesign)

    I try to help.

    Lana Download is a post type.
    Post type: ‘lana-download’

    How to Create a Custom Post Types Archive Page in WordPress

    You have to make archive page in theme.
    So create archive-lana-download.php and add post list php code.

    Example: /wp-content/{theme}/archive-lana-download.php

    <?php
    get_header();
    if(have_posts()) : while(have_posts()) : the_post();
    ?>
       <?php the_title(); ?>
       <div class="entry-content">
          <?php the_content(); ?>
       </div>
    <?php
    endwhile; endif;
    get_footer();
    ?>
    • This reply was modified 2 years ago by  Lana Design. Reason: add code tag
    vrotmanh

    (@vrotmanh)

    Thanks!, that was very helpful. I have another problem now, when I click some archive it said “No download_id defined”. I want to click the archive and start downloading it.
    Thanks again!

    Lana Design

    (@lanadesign)

    Maybe:

    <?php if ( function_exists( 'lana_downloads_manager_get_download_url' ) ): ?>
        <a href="<?php echo esc_attr( lana_downloads_manager_get_download_url( get_the_ID() ) ); ?>">Download</a>
    <?php endif; ?>

    So lana_downloads_manager_get_download_url() function return the download id, first param the post id.

    I’m not sure, try it, let me know if it does not work. 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘List of downloads’ is closed to new replies.