Trisquelmedia SL

Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
in reply to: Open PDF in NEW tab (_blank) #165837

Trisquelmedia SL
Participant

Solved!!

Thxs!!


Trisquelmedia SL
Participant

hi!

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

in reply to: Current $id in a download manager function #165088

Trisquelmedia SL
Participant

Sure!

Thxs

in reply to: Current $id in a download manager function #165086

Trisquelmedia SL
Participant

Thxs Nayeem!!!

Regards

in reply to: Current $id in a download manager function #165057

Trisquelmedia SL
Participant

Thxs Nayeem!

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

in reply to: Current $id in a download manager function #165030

Trisquelmedia SL
Participant

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)