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
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.
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
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?
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
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>
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
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..."
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?
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!
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?
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.
My issue is resolved now. Thank you!
Please, if you can, give me a brief outline of what you did?
SO that I know for the future
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.