How to make the shortcode work

WordPress
March 01, 2021 08:49:31
nspace1999
Topics: 1
Messages: 2
Hello

I use the free version. I have only one template activated with the id : 1.
So I use the shortcode on my single.php template

<?php echo do_shortcode('[e2pdf-download id="1"]'); ?>

But nothing shows on the page. Can you help ?I wanted to buy the pro version but I ma not sure the pro version works.
Thanks

March 01, 2021 09:04:33
nspace1999
Topics: 1
Messages: 2
I forgot to precise something :

Template is set on custom post type.
March 01, 2021 10:11:16
E2Pdf
Topics: 7
Messages: 3614
Support
Hi,

In case you need to use it via PHP call it must be defined "dataset" which is the custom Post ID for which it's need to generate PDF.

<?php echo do_shortcode('[e2pdf-download id="1" dataset="2"]'); ?>

<?php
$post_id = '2';
echo do_shortcode('[e2pdf-download id="1" dataset="'.$post_id.'"]');
?>

We remain at your service.

We would really appreciate your feedback at WordPress.org!
Get News and Updates
Our monthly newsletter keeps you in the loop, so you'll always be up to date with the latest news and updates about E2Pdf.
* You can update your email subscription preferences here.
All trademarks, service marks, trade names, product names, and logos appearing on this website are the property of their respective owners. The use of trademarks such as Formidable Forms®, Forminator Forms®, Gravity Forms®, JetFormBuilder®, WordPress®, WooCommerce®, WPForms® and others is solely for identification purposes (nominative use) and does not imply any affiliation, sponsorship, or endorsement by the respective trademark holders.
© 2017 - 2026, https://e2pdf.com

We use cookies to collect and analyse information on site performance and usage, to provide social media features and to enhance and customise content and advertisements. By clicking "Accept Selected", you consent to use of selected cookies according to our Cookie Policy.