Skip Navigation

[Resolved] Adding url/img links to template for posts

This support ticket is created 6 years, 4 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.

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, 4 months ago.

Assisted by: Christian Cox.

Author
Posts
#1131171
Project View.png

I'm trying to incorporate img links into the shortcode in my template, that will allow the viewer to click on an image and get the larger version of the image to pop=up in a litebox.

Examples -

[wpv-post-featured-image size="custom" width="auto" height="auto"]
[types field='project-image' title='%%TITLE%%' alt='%%ALT%%' size='thumbnail' resize='proportional' separator=' '][/types]

How can I make these link back to the original file, for viewing in a litebox? Additionally, I'd like to add my header and footer to this template (the attached image shows only the view with no header or footer).

Is there any documentation that you are following? - I've tried searching for an answer with no luck.

Is there a similar example that we can see? - hidden link

What is the link to your site? - See above.

New threads created by Christian Cox and linked to this one are listed below:

https://toolset.com/forums/topic/add-header-and-footer-to-template-for-posts/

#1131489

How can I make these link back to the original file, for viewing in a litebox?
Hi, different litebox plugins work in different ways, but usually you must create a link tag that wraps around the thumbnail image. The href attribute of that link tag must point to the full-size image URL. So something like this:

<a href="[wpv-post-featured-image size='full' output='url']">[wpv-post-featured-image size="custom" width="auto" height="auto"]</a><br />
<a href="[types field='project-image' output='raw'][/types]">[types field='project-image' title='%%TITLE%%' alt='%%ALT%%' size='thumbnail' resize='proportional' separator=' '][/types]</a>

Your litebox plugin may require that you add some additional CSS class or attributes to the link, you'll need to consult their documentation.

More information about our shortcodes and their options can be found here:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-featured-image
https://toolset.com/documentation/customizing-sites-using-php/functions/#image

Additionally, I'd like to add my header and footer to this template (the attached image shows only the view with no header or footer).
Our support policy states that we can only address one topic per ticket. I have split this question into a separate ticket so we can continue discussion there: https://toolset.com/forums/topic/add-header-and-footer-to-template-for-posts/

#1131926

So I was able to get it to display my images using the following code working off what you had suggested the winning code is as follows (Yes I changed fields)

1 [types field="project-image" title='%%TITLE%%' alt='%%ALT%%' size="custom" resize='proportional'][/types]

Now I'd like to go a step further if possible to add scrolling through the pictures, currently they jump into litebox individually...

Got any tricks for that?

#1132089

I don't have any tricks for this, because the process depends on your lightbox system. Sometimes you must add a special CSS class or data attribute to each image or link tag to let the lightbox know it's part of a collection, or gallery. Other systems require specific shortcodes or page-builder modules. I suggest you consult the documentation for your specific lightbox system. If you can explain to me in plain English, I will tell you what we can offer in Toolset to work in that system.