• smbaker

    (@smbaker)


    I’m trying to call a function to lookup a specific download by an id. I did the following:

    $downloads = get_downloads(“id=2”);

    However, this didn’t return just one download. It returned them all. It’s simple enough for me to loop through them and pick out the one I wanted by examining the id field, but less efficient that if we’d just have queried for the one we wanted.

    Any ideas?

    https://www.ads-software.com/extend/plugins/download-monitor/

Viewing 1 replies (of 1 total)
  • Mike

    (@jolley_small)

    get_downloads does not support getting one actually – you could use:

    $download = do_shortcode(‘[download id=”2″]’);

    to get one. Or just query manually with thwe $wpdb class.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WordPress Download Monitor] get_downloads(“id=”)’ is closed to new replies.