4

I have created a custom post type and I need to add multiple images to every single post, so I can create a loop and use them in a slider. So far my search on Google etc. has turned up nothing.

What's the cleanest way to add a metabox to the custom post type, so I can add images to the post and create a loop to display them in a slider/gallery?

  • The easiest way would be wordpress.org/plugins/multiple-post-thumbnails – vancoder Jul 1 '14 at 16:15
  • @vancoder Looks pretty cool and almost what I need, but not very intuitive. Perhaps the metaboxes can be moved from the right side to the main area just under the main textarea? – ritmanis Jul 1 '14 at 16:22
  • 1
    You can drag any of the post edit screen's metaboxes around, not to mention you can change the "context" of the Multiple Post Thumbnail's metabox via the arguments you use to initialize it: add "context"=>"normal" to the rest of your arguments. – helgatheviking Jul 1 '14 at 18:49
  • I always use Advanced Custom Fields. The interface is pretty good. You can also get a plugin to the plugin called Gallery, which will give you the ability to use a gallery custom field. Great stuff. – gdaniel Jul 3 '14 at 20:50
7

Thanks for the suggestions, guys. I did some more research, and found this - https://wordpress.org/plugins/attachments/

It's a great plugin that lets you attach images to the post without inserting them in the post and the images can be easily sorted with ajax, it's also quite modifiable and just what I needed, and works on custom post types. You just create a loop and you can use the images in any slider.

|improve this answer|||||
-1

Create a custom text area(post meta) field in your custom post type. Then Add multiple images using add media button of the editor . Now You can use all these uploaded images as slider in your post.

Secondly you can add an extra field (post meta) to that support multiple file uploads that you can use to display as slider.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.