Support

Account

Home Forums Front-end Issues How can I make a gallery field return the attachment IDs? Reply To: How can I make a gallery field return the attachment IDs?

  • The gallery field is stored in the database as a serialized array of attachment IDs.

    You can use native WordPress’ function to get those IDs in a form of simple one-dimensional array:

    get_post_meta( $post_id, 'gallery_field_key', true )