Trisquelmedia SL

Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
Dec 17, 2021 at 8:32 am
#165837
Participant
Trisquelmedia SL
OP

Solved!!

Thxs!!

Dec 13, 2021 at 3:01 pm
#165664
Participant
Trisquelmedia SL
OP

hi!

But in my case i havent user roles, all users are unregistered

Nov 29, 2021 at 11:49 am
#165088
Participant
Trisquelmedia SL
OP

Sure!

Thxs

Nov 29, 2021 at 8:34 am
#165086
Participant
Trisquelmedia SL
OP

Thxs Nayeem!!!

Regards

Nov 27, 2021 at 10:57 am
#165057
Participant
Trisquelmedia SL
OP

Thxs Nayeem!

Anywhere to modify that code to show the total downloads (summatory all packages individual created downloads)

Nov 26, 2021 at 9:33 am
#165030
Participant
Trisquelmedia SL
OP

Sure:

I have created a shortcode [DownloadCounter] it returns download count of a package (in this case package ID “6730”)

function shortcode_download() {
	$download_count = get_package_data(6730,'download_count'); 
	return $download_count;
}
add_shortcode('DownloadCounter', 'shortcode_download');

I dont want to put manually package ID (6730), instead I would like it to (2 different things) :

1) Modify the function to automatically get package ID from the package shown on the current page.

2) Create another function to return the total downloads of the sum of all packages.

Regards

Viewing 6 posts - 1 through 6 (of 6 total)