-
AuthorPosts
-
February 17, 2019 at 9:26 pm #1068020
Hi there, I’m looking to open a PDF in Portfolio Grid Lightbox. Is this possible? If so, where and how do I accomplish this (bear with me I’m new to WordPress)? For example when you click on the first image on my site (ASIC0442_Kinsei_3_Insert-1) it opens in lightbox as a raster image. On click, I would like it to open in lightbox as a PDF.
Thank you in advance!
ChrisFebruary 18, 2019 at 3:13 pm #1068388Hey chris_naples,
Here is a thread for you to consider
https://kriesi.at/support/topic/open-pdf-files-in-lightbox-enfold-v3-0-3/If you need further assistance please let us know.
Best regards,
VictoriaFebruary 18, 2019 at 7:48 pm #1068571Hi Victoria, thank you for your reply!
I did see that post, however could you provide me with instructions on where and how to accomplish this? Specifics please, I’m new to WordPress.
Also, two other questions about my site. My social icon link for Liknedin is adding my website address to the url, any idea why?
Secondly, any way to make the content in my footer align with my header? I used this for the header (Let logo and menu position adapt to browser window) but didn’t see that option for the footer.
Cheers!
Chris- This reply was modified 5 years, 11 months ago by chris_naples.
February 20, 2019 at 2:59 am #1069243Hi Victoria,
I wanted to follow up with you about my additional questions. Your assistance is much appreciated!
Thank you,
ChrisFebruary 20, 2019 at 8:15 pm #1069673Hi,
You need to change your linkedin url to include the https://
that is why it is not working as should.
Best regards,
BasilisFebruary 20, 2019 at 8:33 pm #1069682Hi Basilis, I appreciate your help! However your suggestion did not work. My website URL still proceeds the link to my Linkedin profile.
It’s quite odd, any other suggestions would be appreciated!
Thanks,
ChrisFebruary 21, 2019 at 4:41 am #1069775The social icon link for Linkedin appears to be working now!
Still waiting support on the following please:
1. I’m looking to open a PDF viewer in Portfolio Grid Lightbox. Is this possible? If so, where and how do I accomplish this (bear with me I’m new to WordPress)? For example when you click on the first image on my site (ASIC0442_Kinsei_3_Insert-1) it opens in lightbox as a raster image. On click, I would like it to open in lightbox as a PDF. I also have several other images in my portfolio that I would like to apply this to.
2. Any way to make the content in my footer align with my header? I used this for the header (Let logo and menu position adapt to browser window) but didn’t see that option for the footer.
February 23, 2019 at 10:07 am #1070636Hi,
Thank you for sharing the details.
1. To open a pdf when the user clicks on the portfolio item follow the below steps.
a > Embed the pdf to your page if you cannot do that just copy the PDF link.
b > Add ?iframe=true to the end of the URL to activate lightbox. Please refer to the link usage section.
c > Add a new portfolio item with the PDF thumbnail image then set a custom link to open external pages.2. The footer and header both are full width. If you still have any issue please upload a screenshot/mockup to one of the below sites and share the link here so we can help you better :)
https://snag.gy/
https://ctrlv.cz/en/
https://imgur.comBest regards,
VinayFebruary 27, 2019 at 3:50 am #1072128hi Vinay, I am trying something similar, I am using the Portfolio grid in a page. When a portfolio thumbnail is clicked i would like an iframe of a website to be viewed in a lightbox. I have used several methods, for example
and
Google.combut what i have come to realize is, when i define the custom link in the Link portfolio item to external URL dialog box, it is reset when i click update
any help would be appreciatedMarch 2, 2019 at 11:09 pm #1073774Hi,
Sorry for the late reply, and thanks for the screenshot, is this the url that you are trying to use?open" id="_portfolio_custom_link_url" name="_portfolio_custom_link_url"/>
This doesn’t look like it’s formated correctly
I tried to test by adding a “portfolio grid” element to my page, and then for one portfolio item I added a iframe link to the “Overwrite Portfolio Link setting”
http://kriesi.at?iframe=true
then when I clicked the portfolio item it opened a website in a iframe:
Are these the same steps that you followed?Best regards,
MikeNovember 6, 2020 at 7:28 pm #1258951Hi there, I noticed after the latest updates that PDF’s are no longer opening in Lightbox and open in a new tab which I had codeded not to do, please advise.
Thank you!
November 7, 2020 at 12:53 pm #1259038Hi,
I tested on Windows 10, Chrome & Firefox, and the PDF’s open in the lightbox when clicked directly or when the lightbox “arrows” are used to move to the next image or PDF
But, Edge opens the lightbox and then redirects to the PDF so it is not in a lightbox. Did you add#toolbar=0
to the PDF links? Try removing this from one of the PDF links to see if this helps.
What OS and browser did you test with?Best regards,
MikeNovember 7, 2020 at 8:59 pm #1259073Mike, thanks for your reply!
Just attempted your suggestion, that didn’t work. Sorry, let me clarify… What I’m attempting to fix is to keep the PDF in a pop-up (just like the JPEG’s) on my home page. For some reason after the updates clicking on a PDF will open it as an independent page, rather than staying on my home page with a pop-up of the PDF.
Let me know if you have a suggestion, thanks again!
Chris
November 7, 2020 at 11:06 pm #1259078Hi,
I believe I understand correctly, which browser are you using?
Try adding this to your .htaccess file via ftp:Content-Type: application/pdf Content-Disposition: inline; filename="*.pdf"
Best regards,
MikeNovember 10, 2020 at 8:31 pm #1259655Mike, thanks for your reply! That didn’t work it gave me an error page.
I’m using:
Firefox 82.0.3
Chrome 86.0.4240.18
Safari 12.1.2Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Let me know if you have other suggestions, thanks again!
ChrisNovember 11, 2020 at 1:33 pm #1259875Hi,
Please try posting the content of your .htaccess file so we can see.Best regards,
MikeNovember 11, 2020 at 6:47 pm #1259945Here ya go…
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule># END WordPress
November 12, 2020 at 1:57 pm #1260127Hi,
Thank you, I assume that you tried this:# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /2017demo1/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /2017demo1/index.php [L] </IfModule> # END WordPress Content-Type: application/pdf Content-Disposition: inline; filename="*.pdf"
In my research and test on my localhost, this seems to work, but this might not be correct for your server, if this is how you tested then please ask your webhost if this is correct for your server. If your webhost is on a (MS) DotNet (ASP.Net)server this might be correct, but for most servers, this would be rare.
There is also a chance that your webhost has an option in the backend to activate this “force download” of PDF’s, I recommend opening a support ticket with your webhost and explain how you want to force the download of PDF’s and see if this was the correct way to achieve this with your server.Best regards,
MikeNovember 12, 2020 at 8:50 pm #1260215Mike, I appreciate your help!
Each of your suggestions broke my site and gave me an 500 Internal Server Error! Odd thing is when I test my site as is through WordPress the Lightbox iframes work fine. Once I logout of WordPress is when this occurs. Guess for now this is something I will have to live with unfortunately.
November 13, 2020 at 3:02 pm #1260352Hi,
If I understand correctly, when you are logged in as admin the PDF lightbox work correctly, but when you are logged out they do not?
When I tested your site I was not logged in and the only browser I found an issue in was Edge.
The 500 Internal Server Error is a sign that my suggestions are not correct for your server, did you get a chance to ask your webhost what the correct code for your server would be?Best regards,
MikeNovember 13, 2020 at 8:15 pm #1260386Mike, you got it. When logged in WordPress as Admin everything works perfect (as it did before updates), not so much when logged out, only JPEG’s work correctly with lightbox.
My web host tells me I’m on a linux server.
Thanks!
ChrisNovember 14, 2020 at 3:29 am #1260427Interesting I found one PDF on my site that does work in lightbox!? I don’t see a difference in any of the code compared to the other PDF’s.
November 15, 2020 at 1:47 pm #1260581Hi,
Glad to hear that you heard back from your webhost, but unfortunately I’m not sure what the correct way to get your server to open the pdf’s inline is, did your webhost offer any advice for this?Best regards,
MikeNovember 16, 2020 at 7:48 pm #1260776Mike, I have not asked them… Not even sure what I would ask? Is it your thought this is a host/server issue over my Enfold Theme? I find it odd that I can open only one of my PDF’s in the popup lightbox and not any of the others. Seems like that would be a bug from the Theme?
Thanks!
ChrisNovember 17, 2020 at 3:19 pm #1261023Hi,
Since on Windows I was only able to recreate your error in the browser “Edge”, I tested your site on a Mac with Safari, and I found that the PDF’s open in a lightbox, but they are also redirected to the PDF directly, so if you click the “back” button after the PDF is opened in a new tab (window) I see the empty “lightbox”.
So I believe that Safari is showing the PDF inline, as directed by the site, but I believe that Safari also wants to show the PDF in a new tab by default, as directed by the browser.
So I would suggest converting your PDF’s to images to display like this.
A PDF is a custom “document” type, which is treaded like an HTML document and not like an image type.
At this point, I don’t believe there is a command for the server to serve the PDF inline.. since it is already occurring.
I also note that if you open an “image” first and use the “next” arrows to the next lightbox item, the PDF’s open in the lightbox, it seems that opening the PDF’s directly is the issue.Best regards,
Mike -
AuthorPosts
- You must be logged in to reply to this topic.