Image Shortcode from ACF

I would like to create a shortcode that displays the image from an ACF custom field which currently has the return format set to the Image ID. The shortcode also needs to accept a post_id so it can get the field from a certain page.

So the shortcode would be:

[acf_image field=”image_field” post_id=”88″]

I am aware that there is an ACF shortcode available, but there is already another location which is dependant on the return format as ID. So I cannot change this.

Read more here:: Image Shortcode from ACF

Leave a Reply

Your email address will not be published. Required fields are marked *