Tagged: x
-
AuthorPosts
-
January 9, 2017 at 6:57 pm #1323216
EricParticipantHey I’m trying to create a button on my portfolio item page that when clicked, will open up a PDF document (either in the browser or via download). Now I figured out how to do all that using this forum (https://community.theme.co/forums/topic/automatically-downloading-a-pdf-from-a-button/), which taught me how to link to a PDF using shortcodes.
However what I can’t figure out is how to password protect one specific element on a page, which in this case would be the button that triggers my PDF download. Ideally when the button is clicked it should create a pop-up form requesting a password, and then once it’s entered, the download would begin (or the PDF would open within a new tab).
Now within the forum I saw that this can be accomplished using a plugin (you guys linked someone to this website: https://www.tipsandtricks-hq.com/create-a-password-protected-download-file-6838). However, if possible, I’d really like to do this without a plugin, just because they’re already beginning to slow down my website.
So if you can, please let me know if this is possible, and if it is, please tell me how I should go about doing this. If it’s not possible I would also appreciate any other suggestions that you might have.
Thanks!
January 9, 2017 at 6:58 pm #1323217
EricParticipantThis reply has been marked as private.January 9, 2017 at 11:13 pm #1323430
Prasant RaiModeratorHello Eric,
Thanks for writing in!
You will have to use plugins to password protect downloadable files. We recommend you to follow the steps mentioned on tipsandtricks-hq.com.
You can walk-through our website performance optimization guide to speedup your website:
https://community.theme.co/kb/performance/
Thanks.
January 10, 2017 at 9:42 pm #1324968
EricParticipantJust out of curiosity how come this code wouldn’t work?
[protect] Your Button Text [/protect]
Shouldn’t this password protect the link for my download? Or is the [protect] [/protect] shortcode for something else?
Let me know and thanks for your help.
January 11, 2017 at 1:49 am #1325141
ChristopherModeratorHi there,
I added following shortcode in ‘Protect’ element and it worked :
[button type="real" shape="square" size="mini" href="#example" title="Example"]Square Button[/button]Hope it helps.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1323216 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
