Skip Navigation

[Resolved] I need featured image with link field, only have POST TITLE WITH LINK available

This support ticket is created 3 years, 7 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 37 replies, has 2 voices.

Last updated by Christian Cox 3 years, 7 months ago.

Assisted by: Christian Cox.

Author
Posts
#1771387
IMG_9142.jpg

Tell us what you are trying to do?
I have created a website with a search page in Blocks, but you can only the 'post title' has link. I want the image to link
Is there any documentation that you are following?

Is there a similar example that we can see?

What is the link to your site?
hidden link

#1772287

Hi, there's not an easy way to do this in the Block Editor that I'm aware of. Instead, you can use HTML to create a link using the featured image shortcode. In a Classic editor block, try this code:

<a href="[wpv-post-url]">[wpv-post-featured-image size="custom" height="200" width="300"]</a>

You can adjust the height and width attributes if you'd like to use a custom size. The other attributes you can adjust for this shortcode are documented here: https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-post-featured-image

Let me know if you have questions about that.

#1772517
IMG_9145.jpg

Thank you for your response Christian.
But where exactly do i place the code you have given me.

Within the Image block that i've created that has the dynamic link 'Featured image', do i click options/edit with html... and plant the code that way?

See image for example

#1772573
Screen Shot 2020-09-10 at 3.41.30 PM.png

Okay I would insert a "Classic" block in the Block Editor and place the code inside the Classic block, instead of using an image block. You can use the block search box to search for "classic", or browse all blocks to find it, as shown in the screenshot here. Does that make sense?

#1772605

Ok i'll try that. Thanks
Where do I slot in the code exactly?

So what I want is search result box with -
Post tile with link
Featured image with link
STandered field (to house text )

All contained

#1772653

I don't quite understand, sorry! Could you provide more details about what you want to achieve? Are you saying you want one link that contains the header h3 text, the image, and also the text content, so the entire grid cell is one clickable link? Something like this:

<a href="<em><u>hidden link</u></em>">
  <h3>Bungalow E</h3>
  <img src="<em><u>hidden link</u></em>" />
  <p>Bungalow Mikaella offers a barbecue. If you would like to discover the area, diving, cycling and fishing are possible in the surroundings. This is our guests' favourite part of Coral...</p>
</a>

Or are you saying you want each element in the grid cell to be linked to the same post URL separately, something like this?

<div>
<a href="<em><u>hidden link</u></em>">
  <h3>Bungalow E</h3>
</a>
<a href="<em><u>hidden link</u></em>">
  <img src="<em><u>hidden link</u></em>" />
</a>
<a>
  <p>Bungalow Mikaella offers a barbecue. If you would like to discover the area, diving, cycling and fishing are possible in the surroundings. This is our guests' favourite part of Coral...</p>
</a>
</div>
#1772657
IMG_9147.jpg

on the property search page of my website
- the results that come up have a box for each property listed below
BUT you can only 'post tile' has a link, so I need the whole box or Just the Featured image to be linkable.

So, i suppose thats what i need help with - Instruction on how to make the featured image (or whole box) linkable

I placed a 'Classic' block within the container, under the post title - but it didnt work

#1772667

In answer to your above question, its the second suggested version i need.
"Or are you saying you want each element in the grid cell to be linked to the same post URL separately..."

#1772669

Sorry Christen - no your first suggestion is more accurate.
I would like the whole cell to be one clickable link. Can you help me with that?

#1772671

If the shortcodes are not working as expected, I can log in and set it up for you. Please provide login credentials in the private reply fields here, and I will take a closer look. Thank you, and sorry for the confusion!

#1772685

I see you have provided the same Username twice, but with two different passwords. I tried both of these passwords but neither seems to work. Can you double check the credentials?

#1772705

Okay thank you, this time I was able to log in. I added the clickable featured image and some left and right padding. Please take a look and let me know if this isn't what you were expecting.

#1772711

My issue is resolved now. Thank you!

#1772713

Please, if you can, give me a brief outline of what you did?
SO that I know for the future

#1774867
Screen Shot 2020-09-13 at 11.08.14 AM.png

First I added a Classic Block in the Block editor. Then in the block options menu I clicked "Edit as HTML". See the screenshot here for an example of this menu. Then I pasted the code in the Classic Block's HTML editor. I don't recall the exact code but it was something like this:

<a href="[wpv-post-url]">[wpv-post-featured-image size="custom" height="200px" width="300px"]</a>

You should be able to see the exact code if you edit this Content Template. When you mark a ticket as "resolved", all your login information is removed so I am not able to log in right now to copy the code.

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