Hi,
The following displays the featured image thumbnail linked to the current post:
[field thumbnail-link]
To get it from a different post, you can specify its name:
[field thumbnail-link name=hello-world]
..or use a loop for multiple posts and fields, for example, the three most recent posts:
[loop type=post count=3]
[field thumbnail-link]
[field title-link]
[/loop]
For details, please refer to the documentation under Settings -> Custom Content.
Hi again,
I am trying to use [field thumbnail] inside a DIV tag (inside a loop), but it doesn’t seem to recognize it. I guess it’s not possible to do this?
There should be no problem wrapping it in a div tag. Could you post the code and the result that you’re expecting?
Hello Eliot,
Here is the code:
<div align="center" style="background-image: url([field thumbnail]); height: 200px; width: 200px;">[field link]</div>
I am trying to get the thumbnail to display as the background of the div, but the output I get is just this:
); height: 200px; width: 200px;”><link>
No background image shows up and it spits out part of the div tag as a text string next to the link.
Ah, I see. The thumbnail field outputs the whole <img> tag. Here’s how to get only the thumbnail URL:
[field thumbnail-url]
Thanks so much! That did it! You’re awesome!