Skip Navigation

[Resolved] open only pdf results in a new tab

This support ticket is created 6 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 3 replies, has 2 voices.

Last updated by Christian Cox 6 years, 9 months ago.

Assisted by: Christian Cox.

Author
Posts
#551652

I made have this page results:
hidden link

some of the links here are to PDF files, can you help me understand how i set ONLY these links (the one that goes to pdf file) to open on a new tab?

#551765

Hi, I can help with this. It looks like your server is already set up to display PDFs in the browser instead of forcing downloads, so that's good. The next step is to modify the structure of each PDF link tag to use the "target" attribute. Typically target="_blank" is used to signal the browser to open a link in a new tab / window. Here's a basic example of that:

<a href="<em><u>hidden link</u></em>" target="_blank">File name</a>

If you're using the standard wpv-post-link shortcode to display these links, you can try to replace it with a link tag and the wpv-post-url shortcode:

<a href="[wpv-post-url]" target="_blank">[wpv-post-title]</a>

Let me know if you have any questions about that.

#551767

the problem is that the "attachment" link is not editable
it is automatically generated by the Relevanssi – A Better Search — WordPress Plugins

#551798

Can you tell me more about how your site is constructed?
- Are you using Toolset Layouts? If so, what Layout is assigned to the Search archive?
- Are you displaying a WordPress Archive on this page? If so, what code is included in the WordPress Archive Loop Output editor? If there is a Content Template for this archive, please copy + paste its code here as well.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.