• Resolved Mariette

    (@mariettej)


    Hi

    I am trying to switch from Custom Content Shortcode to Loops & Logic as advised. However, I am struggling to find the right code to use to display the thumbnail version of a feature image.

    This is the field code I am using:

    <Field image />

    but this displays the full-size version.

    With Custom Content Shortcode I was able to use this:

    [field thumbnail]

    but <Field thumbnail /> doesn’t work for Loops & Logic.

    Could you help please?

    many thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Tangible

    (@tangibleinc)

    Hi @mariettej! There are two ways to accomplish this that we’ve recently added and they’ll be included in the documentation soon. The first is to use the size attribute with the image field which in your case would look something like <Field image size=thumbnail />. You can also use any of the other three default WordPress image sizes.

    Since L&L is an extension of HTML and accepts all the standard HTML tags, the second way to achieve this is to just reference the image_url field inside an img tag and then use any of the regular attributes you’re familiar with in HTML to resize it. Something like <img src="{Field image_url}" alt="{Field title}" />

    With that second method, notice the curly braces {}, which is how you can use dynamic tags as the attribute value of some other tag. If you want to learn more about that syntax, check out this post.

    Thread Starter Mariette

    (@mariettej)

    That’s great – thank you very much for your help ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Display thumbnail image in loop’ is closed to new replies.