Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Eliot Akira

    (@miyarakira)

    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.

    Thread Starter goluboy

    (@goluboy)

    Thanks a bunch!

    Thread Starter goluboy

    (@goluboy)

    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?

    Plugin Author Eliot Akira

    (@miyarakira)

    There should be no problem wrapping it in a div tag. Could you post the code and the result that you’re expecting?

    Thread Starter goluboy

    (@goluboy)

    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.

    Plugin Author Eliot Akira

    (@miyarakira)

    Ah, I see. The thumbnail field outputs the whole <img> tag. Here’s how to get only the thumbnail URL:

    [field thumbnail-url]
    Thread Starter goluboy

    (@goluboy)

    Thanks so much! That did it! You’re awesome!

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Thumbnail featured image’ is closed to new replies.