Skip Navigation

[Résolu] How to link a picture to post with link?

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.

This topic contains 4 réponses, has 2 voix.

Last updated by nthulaneM Il y a 6 années et 10 mois.

Assigned support staff: Waqas.

Auteur
Publications
#273249
Screen Shot 2015-01-03 at 11.09.01 PM.png

I am trying to: Link a picture to

[wpv-post-link]

in a views listing page. So instead of creating a table or listing page with a picture and a title, i would like to just have pictures that are linked to particular posts. Right now, all i have is a table that has a picture and corresponding post with link, that is attached. Please help.

I visited this URL:

I expected to see:

Instead, I got:

#273462

Waqas
Supporter

Languages: Anglais (English )

Timezone: Asia/Karachi (GMT+05:00)

You can wrap your image in A tag and can use [wpv-post-link] short code in href attribute of the A tag, such as:

<a href="[wpv-post-link]">[types field="logo" size="thumbnail" align="none" resize="proportional"][/types]</a>

This will link your image to the post's link.

#273658
Screen Shot 2015-01-05 at 9.18.51 PM.png

Thank you for responding. I have adjusted the link the way that you suggested but the photos do not link to the [wp-post-link]. It states a 404 error.

I have tried to replace href with [wp-post-title], [wp-post-slug] and [wp-post-url] and they are all broken.

Please help.

#273795

Waqas
Supporter

Languages: Anglais (English )

Timezone: Asia/Karachi (GMT+05:00)

Can you please try [wpv-post-url] in place of the existing short code, like below:

<a href="[wpv-post-url]">[types field="logo" size="thumbnail" align="none" resize="proportional"][/types]</a>

Actually, [wpv-post-link] returns post title linked with the permalink. I apologize I didn't realize that previously that's why it may have broken the URL. Using above with [wpv-post-url] should solve the issue.

#273928

Thanks. I noticed that i had forgotten the "v" in "[wpv-post-url]"