error theme swift

Viewing 5 posts - 1 through 5 (of 5 total)
#76580

Marco
Member

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

#76585

Shahriar
Moderator

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;
    }
}
#77091

Marco
Member

homepage not view download product

#77138

Shahriar
Moderator

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

#78285

Shahjada
Keymaster
Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘error theme swift’ is closed to new replies.