Support

Account

Home Forums ACF PRO Displaying custom field on all attached media items Reply To: Displaying custom field on all attached media items

  • Hi @aswhipple

    I think you can use the the_content filter and try to find the attachment URL. After that, you need to convert this URL to the attachment ID. Here’s an example how to do that: http://wordpress.stackexchange.com/questions/6645/turn-a-url-into-an-attachment-post-id.

    After you got the attachment ID, you can use the get_field() or the_field() function and replace the image by using the preg_replace() function.

    I’m afraid I can’t give you more details as it needs an advanced code. I’m sorry about that.

    I hope this helps 🙂