download wordpress posts bulk template

WordPress
18 March, 2020 13:41:32
Topics: 4
Messages: 12
Hi,

I have 1 template for 1 post. with the download button this gives me 1 pdf. which works great! But i was wondering if I can bulk download all the posts into one pdf based on each post as a seperate database?

Cheers!
18 March, 2020 14:29:44
E2Pdf
Support
Topics: 7
Messages: 3331
Hi,

Unfortunately this feature is not yet available but we have it already in our roadmap. If you have coding skills, you can try to prepare some php code to iterate over posts and use [e2pdf-save] shortcode for example:

do_shortcode('[e2pdf-save id="1" dataset="' . $post_id . '"]');

We will update this thread as soon as it will be added built-in feature.

We remain at your service.
We would really appreciate your feedback at WordPress.org!
19 March, 2020 17:19:22
Topics: 4
Messages: 12
Thank you for the reply!
I'm using elementor and I'm creating my own plugin. When i use the shortcode in Elementor it work. Elementor has a widget to place shortcodes in and this one works:

[e2pdf-download id="1"]

But, now I want to make a bulk download with a query-loop so i need to use the do_shortcode() as you suggested. But I can't get it to work! could you help me out please. Do you know why the do_shortcode is not working?

I use this shortcode in elementor: [labels]

function bulk_labels_shortcode(){
echo 'test';
do_shortcode('[e2pdf-download id="1"]'); //this doesnt work
echo do_shortcode('[e2pdf-download id="1"]'); // this doesnt work either
}
add_shortcode( 'labels', 'labels_shortcode' );
19 March, 2020 17:21:20
Topics: 4
Messages: 12
This: add_shortcode( 'labels', 'labels_shortcode' );
should be: add_shortcode( 'labels', 'bulk_labels_shortcode' );

of course. I changed the names for this forum
19 March, 2020 17:51:52
E2Pdf
Support
Topics: 7
Messages: 3331
Hi,

It will not work as you didn't specify "dataset" as in example and plugin just don't know for which post need to generate download link.

Please check example here: https://codeshare.io/GkRBgx.

We remain at your service.


We would really appreciate your feedback at WordPress.org!