WordPress.org

Ready to get started?Download WordPress

Forums

Download Monitor
How to add a widget for recently added ? (7 posts)

  1. Moogle Stiltzkin
    Member
    Posted 2 years ago #

    Hi,

    i am trying to add a widget to show the top 10 recently added downloads to my website

    http://mognet.no-ip.info

    Using this code someone else here already posted, it works, but only shows 1 result .... not as useful as showing 10 or 5-6 results at least.

    [code]<?php
    echo '

      ';
      echo do_shortcode('[downloads query="limit=1&orderby=date&order=DESC" format="4" wrap="" before="<li class="nobullet">" after="]');
      echo '
    ';
    ?>
    [/code]

    when i changed the limit from 1 to 10, nothing happens. Please can someone teach me what i did wrong ???

    By the way i am using WP PHP widget Version 1.0.2 by wpxue so i can add the php code to the widget.

  2. Acelondoner
    Member
    Posted 2 years ago #

    This is what I use in a widget.

    10 latest uploads
    <?php echo do_shortcode('[downloads query="limit=10&orderby=date&order=desc" format="3"]'); ?>

    Top 10 downloads
    <?php echo do_shortcode('[downloads query="limit=10&orderby=hits&order=desc" format="3"]'); ?>

    It shows them well but when someone clicks on one, it doesn't direct them to the download item but instead just downloads it straight away which is not great but try it anywys.

    You can see a working example on my dubstep site. Just look on the right sidebar.

    Hope this helps, cheers.

  3. Moogle Stiltzkin
    Member
    Posted 2 years ago #

    You sir are a friggin genius, and my hero <3

    Thank you so much :} *bow

    yes i also noticed when you click on the widget thingy it straight away downloads instead of going to the page.

    But at least if you set the min-level required, they can't immediately download. So i guess it works out fine :D

    Thx again.

  4. Fabmaclover
    Member
    Posted 2 years ago #

    As Moogle, i will rather to have it redirected to the downloading page of the specific download link rather to automatically launch the download... even if i restricted my downloads to members only...

    anyone by chance will know how to make that happen?

  5. Moogle Stiltzkin
    Member
    Posted 2 years ago #

    How did you align the filename text for the top 10 downloads to be aligned left ?

    <?php echo do_shortcode('[downloads query="limit=10&orderby=date&order=desc" format="3"]'); ?>

    Couldn't figure it out ;[

  6. Moogle Stiltzkin
    Member
    Posted 2 years ago #

    Hm this worked

    <div align="left">
    
    <?php echo do_shortcode('[downloads query="limit=10&orderby=date&order=desc" format="3" wrap="" before="<li class="nobullet">" after="]'); ?>
    
    </div>
  7. Moogle Stiltzkin
    Member
    Posted 2 years ago #

    The one i'm using for my site is

    <div align="left">
    
    <?php echo do_shortcode('[downloads query="limit=10&orderby=date&order=desc" format="3" ]'); ?>
    
    </div>

    Because it looks nicer with the themes Z tags from the theme :}

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic