1

enter image description here

How can i add this type of field in the custom post type

  • You are using plugin for multiple image upload? – Bindiya Patoliya Jul 3 '14 at 10:00
  • Thanku @ Bindiya Patoliya , but actly i want to learn so that , so any tutorial link, no i m not using any plugin.. – ajit Jul 3 '14 at 10:05
  • which theme you are using? – Bindiya Patoliya Jul 3 '14 at 10:22
  • I design my own custom theme. and their i intigrate this code for the custom post type.. function ajit_create_post_type() { $labels = array( 'name' => __( 'Open House' ), 'singular_name' => __( 'Open House' ), ); $args = array( 'labels' => $labels, 'has_archive' => true, 'public' => true, 'hierarchical' => false, 'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', ), ); register_post_type( 'Open_house', $args ); } add_action( 'init', 'ajit_create_post_type' ); – ajit Jul 3 '14 at 11:07
  • give me your multi upload code – Bindiya Patoliya Jul 3 '14 at 11:19
1

I would use something like Advanced Custom Fields - its very easy to use and you can call any of it's values pretty simply using a ACF short-code like <?php the_field('image1'); ?>

It works with any post types and lets you customise which fields are shown on each type.

If you are looking to learn how and implement it all yourself then make sure you:

  1. Have a bit of time, and patience
  2. A local test server (such as MAMP or WAMP) to play around on without breaking your website.
  3. Give this website a read and of course The Codex.

EDIT

Preview of ACF image boxes

Preview of ACF image uploader

WITH IMAGE

Preview of uploaded

  • Thanx @Bysander Thanx for the help, i will try near about 4 time but i failed, to implement. themefoundation.com/wordpress-meta-boxes-guide This link is really helpfull Thanx for the link. i will try more... Thanx.. – ajit Jul 5 '14 at 5:31
  • I would recommend using Advanced Custom Fields - details above - very simple yet powerful plugin that will save you a lot of time adding your custom meta data to posts. The link was to help you if you wanted to code it yourself but can be a bit to get your head round. – Bysander Jul 7 '14 at 10:37

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.