error theme swift

This topic contains 4 replies, has 3 voices, and was last updated by  Shahjada 2 weeks, 1 day ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #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

    • This topic was modified 1 month ago by  Marco.
    #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
    Member
Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.