error theme swift

in Download Manager Free

Viewing 5 posts - 1 through 5 (of 5 total)
May 21, 2018 at 6:34 pm
#76580
Member
Marco
OP

Fatal error: Call to undefined function wpdm_total_downloads() in /membri/swiftthemes/wp-content/themes/swift/footer.php on line 86

my site hosted https://en.altervista.org

May 21, 2018 at 9:54 pm
#76585
Moderator
Shahriar
Staff

Add the following code at the bottom of Swift’s functions.hp file. That should fix the issue.

if( ! function_exists('wpdm_total_downloads') ){
    function wpdm_total_downloads($uid = null){
        global $wpdb;
        if(isset($uid) && $uid > 0)
            $download_count = $wpdb->get_var("select sum(pm.meta_value) from {$wpdb->prefix}postmeta pm, {$wpdb->prefix}posts p where meta_key='__wpdm_download_count' and p.ID = pm.post_id and p.post_author = '{$uid}'");
        else
            $download_count = $wpdb->get_var("select sum(meta_value) from {$wpdb->prefix}postmeta where meta_key='__wpdm_download_count'");
        return (int)$download_count;
    }
}
May 24, 2018 at 1:26 pm
#77091
Member
Marco
OP

homepage not view download product

May 24, 2018 at 6:37 pm
#77138
Moderator
Shahriar
Staff

Could you please explain little more? Or send temporary wp-admin login info in private reply?

Jun 6, 2018 at 6:59 pm
#78285
Viewing 5 posts - 1 through 5 (of 5 total)

The topic "error theme swift" is closed to new replies.