Support » Plugin: Query Wrangler » How to get he image url instead of image ID?

  • Resolved solosimar

    (@solosimar)


    Hi!
    I’m trying to get all the images uploaded through an image custom field created with the Advanced Custom Fields plugin, but the query results keeps giving me the image ID instead of it’s url. The custom field is getting the image full url, which is correctly displayed on the individual pages, but for some reason, when I go to Query Wrangler, it only gives me a number (the ID) and not the image itself. I triyed playing around with the option “Rewrite the output of this field” without success. Could you give me some lights on how to accomplish this? Many thanks!

    http://wordpress.org/plugins/query-wrangler/

    [ Please do not bump, that’s not permitted here. ]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jonathan Daggerhart

    (@daggerhart)

    Just did a simple test, I think in QW you need to use the field “Custom Field: image_file” instead of Custom Field: image. Could you try that out and let me know if it meets your needs?

    Plugin Author Jonathan Daggerhart

    (@daggerhart)

    Nevermind, that was a bad test I did. I’ll look into it more this evening and let you know what I find.

    Plugin Author Jonathan Daggerhart

    (@daggerhart)

    Solosimar,

    I’ve did more work on this but ultimately came to the conclusion that I will have to develop what views calls relationships to get this working correctly. Otherwise, I’d have to write a custom field handler for any and every custom field or custom post_type plugin out there.

    As soon as I have a reasonable solution for you, I’ll let you know.

    Plugin Author Jonathan Daggerhart

    (@daggerhart)

    Solosimar,

    In the newest release (1.5.23), I added options for meta value (custom) fields that should help this issue.

    When editing a meta value field, if you have “Advanced Custom Fields” plugin active, you should be able to select it as the field’s “Display Handler”.

    For example, if you have an Image field, you can; select “Advanced Custom Fields: get_field” as the display handler, check “Load Image IDs as Images”, and select the “Image Display Style”. This should output the ACF fields as images of the chosen style.

    This is assuming that the field returns ImageIDs. I don’t have ACF Pro, so I’m not sure if this will work for repeater fields, but it might (according to the ACF API). If you have issues with a repeater field, make sure you adjust the “Count” to 0.

    Please let me know if you have any issues.
    Let me know if you get a chance to test this, and if you have any issues.

    Thanks,
    Jonathan

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to get he image url instead of image ID?’ is closed to new replies.