How to create image gallery with CUSTOM POST

Sometimes u did’t find the plugin gallery you need but you can create your own with WordPress CUSTOM POST in my post i have attached image of examples and code.
Paste this code in function and change the post name what you have decided

Keep this code where you want to show your gallery
Download raw file click here