• Resolved strategery

    (@strategery)


    I am trying desperately to create a loop of custom posts with an image field. The closest I’ve got is to get the image ID to display.

    I have tried every variation from ‘[content field headshot]’ to ‘[field headshot:to_image_src]’ and many, many other variations.

    From what I’ve read, it appears that displaying an image is perhaps something a shortcode cannot do, or cannot do in a loop with a custom field.

    Either way, I’m kind of at the end of my tether. Any advice on how to get this to work?

    https://ww.wp.xz.cn/plugins/custom-content-shortcode/

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

    (@miyarakira)

    Hello,

    It should be possible to display an image field stored as attachment ID, like this:

    [content image="image_field_name" size="thumbnail"]

    There is a short description of the image parameter under the Content tab in the documentation (Settings -> Custom Content).

    Please let me know if that works for you.

    Thread Starter strategery

    (@strategery)

    That worked! Thank you so much. I’m fairly new to WordPress, as I mostly have worked in drupal, so understanding the syntax has proven to be a bit of a challenge. Thanks for the quick and accurate response!

    Plugin Author Eliot Akira

    (@miyarakira)

    Sure, no problem, I’m glad it worked. I’ll try to improve the documentation to make it more clear, maybe more examples.

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

The topic ‘Using Shortcode on Custom Image In Loop’ is closed to new replies.