Please suggest me a way for adding gallery and then loading it in specific template.
For now I'm using ACF plugin to upload images to specific posts. And then adding gallery field by using toolset " Load non-Types custom fields". But this method is not useful for me as I want to make this section as attachment.
"I want to make this section as attachment", what do you mean by this?
Are you talking about using the built-in WordPress gallery shortcode?
Is that why you are using ACF image fields instead of Types image fields? (I'm not sure how ACF image fields are stored, but the gallery shortcode needs a list of image post IDs, maybe ACF stores them like that?)
I mean, I want to display images that are added by ACF gallery in custom posts.
Only the images related to specific post show.
But when I load the page it shows numbers like 948,952. I believe that are database id's for the images. Please provide a solution so I can display images.
Toolset itself doesn't have any way to output ACF Gallery fields as a gallery of images.
ACF itself doesn't have any way to output ACF Gallery fields as a gallery of images, without writing PHP.
The ACF documentation gives an example of using PHP to output the gallery of images: hidden link
You could modify that so that it worked with a shortcode, which would mean building the markup as a string to be returned by the shortcode, rather than echoing each part as in their example.
Then you could include the custom shortcode in the template you make with Toolset.
However, I tested simply using the built-in WordPress gallery shortcode, and using the wpv-post-field shortcode to provide the list of IDs (coming from the ACF Gallery field), and that seemed to work.
I can't say for sure that it will with Divi in the context you are using, but you could try replacing where you currently output the field value directly with