Shortcode not working

WordPress Resolved
February 19, 2024 02:41:27
Stadtluft
Topics: 5
Messages: 9
Hi there :)

I am trying to display a Download PDF button to a Custom Post Type to download a PDF with the data from the Custom Post (I am suing ACF).

In the "Export" I can download the PDF and it's working but when I add the shortcode [e2pdf-download id="1"] to my template is not working.

I am using Bricks and when I add it it says that the Shortcode is empty. See attached screenshot.

The Template is acrtivated and as "Item" I chose the name of my Post Type "Kantone".

What am I doing wrong?

Many thanks in advance
A.
February 19, 2024 02:56:44
Stadtluft
Topics: 5
Messages: 9
PS: I also tried this way but when I click on the URL it simply redirect me to the same post and does not download the PDF

<a class="button" href="[e2pdf-download id=1]" target="_blank" rel="noopener">Custom Text or Icon</a>
February 19, 2024 04:27:51
E2Pdf
Topics: 7
Messages: 3617
Support
Hello,

Try please to use the shortcode below in the shortcode block or rich text.:

[e2pdf-download id="1" dataset="{post_id}"]

We would really appreciate your feedback at WordPress.org!
February 19, 2024 04:32:39
Stadtluft
Topics: 5
Messages: 9
Hi!

It's kind of working now. The only problem is that it downloads the PDF every time I reload the page.

How come?
February 19, 2024 04:34:02
E2Pdf
Topics: 7
Messages: 3617
Support
Check please if you didn't set "Auto Download" in the E2Pdf Template Settings: https://e2pdf.com/docs/templates/builder/settings#template

We would really appreciate your feedback at WordPress.org!
February 19, 2024 04:39:23
Stadtluft
Topics: 5
Messages: 9
Many thanks! :)

It works like a charm now.
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.