Title: [Plugin: Custom Content Type Manager] Multi-select Image
Last modified: August 20, 2016

---

# [Plugin: Custom Content Type Manager] Multi-select Image

 *  [yesfree](https://wordpress.org/support/users/yesfree/)
 * (@yesfree)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-custom-content-type-manager-multi-select-image/)
 * Thanks for the not making this GREAT plugin a premium one…I will definitely donate
   for this, Thanks again, By the way how can i make the multi-select option output
   an image..
 * Example
    Assuming i have 3 images here [http://postimage.org/image/dqn5l002v/](http://postimage.org/image/dqn5l002v/)
   and i want the option i choose to output in an image form
 * Multi-Select –> Visa >> When chosen i get Visa image.
    Master Card >> When chosen
   i get Master Card image. America Express >> When chosen i get American Express
   image.
 * Help Me…Thanks
 * [http://wordpress.org/extend/plugins/custom-content-type-manager/](http://wordpress.org/extend/plugins/custom-content-type-manager/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Contributor [fireproofsocks](https://wordpress.org/support/users/fireproofsocks/)
 * (@fireproofsocks)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-custom-content-type-manager-multi-select-image/#post-2561231)
 * Glad the plugin is useful to you. Donations keep things ticking.
 * There are a lot of ways you could do the image thing here… here’s what I would
   do:
 * 1. Upload your 3 credit card images and take note of their IDs (you’ll see the
   attachment_id in the URL when you edit the image under the Media library menu,
   e.g. `http://yoursite.com/wp-admin/media.php?attachment_id=123&action=edit`
 * 2. Inside the CCTM, create a multi-select field and be sure to check the “Distinct
   options/values?” checkbox. You’ll want to list the Option as the name of the 
   credit card and put the attachment ID as the Stored Value, e.g.
 *     ```
       * Visa 123
       * Master Card 124
       *American Express 125
       ```
   
 * 3. Choose the “gallery” output filter: that will convert one or many image ids(
   the attachment ids) to their images. (See docs here: [http://code.google.com/p/wordpress-custom-content-type-manager/wiki/gallery_OutputFilter](http://code.google.com/p/wordpress-custom-content-type-manager/wiki/gallery_OutputFilter))
 * You may need to download the dev version for this — there are a few bugs on the
   current version that are fixed on the dev branch.
 *  Thread Starter [yesfree](https://wordpress.org/support/users/yesfree/)
 * (@yesfree)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-custom-content-type-manager-multi-select-image/#post-2561390)
 * Thanks for the fast reply i really appreciate it, It worked but it returns this
   error code at top of the image.
 * Payment Methods:
    Warning: imagesx() expects parameter 1 to be resource, null
   given in C:\xampp\htdocs\mysite\wp-content\plugins\custom-content-type-manager\
   filters\gallery.php on line 62
 * Warning: imagesy() expects parameter 1 to be resource, null given in C:\xampp\
   htdocs\mysite\wp-content\plugins\custom-content-type-manager\filters\gallery.
   php on line 63
 * Hope its fixable please help me.
 *  Plugin Contributor [fireproofsocks](https://wordpress.org/support/users/fireproofsocks/)
 * (@fireproofsocks)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-custom-content-type-manager-multi-select-image/#post-2561399)
 * Sorry, you’ll have to play around with this yourself — if you don’t supply a 
   value, the filter fails. It’s just basic lookup stuff. Sorry, I get emailed about
   this type of thing all. the. time. It’s 24/7 with no pay = bad investment. And
   I have almost no internet access and I’m swamped taking care of dying family 
   members, so I can’t hold everybody’s hand. My life is an out of body experience
   right now, so you’ll have to forgive the brevity.
 *  Thread Starter [yesfree](https://wordpress.org/support/users/yesfree/)
 * (@yesfree)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-custom-content-type-manager-multi-select-image/#post-2561403)
 * Thanks for your time and help and please don’t say its bad investment u will 
   surely gain from it, It’s just a matter of time…and please i’m not good at coding
   so kindly tell me whats making that error appear, I know u can easily solve this
   for me, Thanks again.
 *  Plugin Contributor [fireproofsocks](https://wordpress.org/support/users/fireproofsocks/)
 * (@fireproofsocks)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-custom-content-type-manager-multi-select-image/#post-2561434)
 * I apologize for snapping — yesterday was a bad day, and that wasn’t a good response
   for the forums. Watching someone fade away in hospice care is awful.
 * Let me test the gallery bit here… you could do this without even using WP’s media
   library. You could upload 3 images and just input their names as your multi-select
   values, e.g.
 * visa
    mc amx
 * And then in your template you could do something simple with an if-statement 
   or 2:
 *     ```
       <?php
   
       $my_cards = get_custom_field('cc:to_array');
   
       foreach ($my_cards as $cc) {
          if ($cc == 'visa') {
               print '<img src="full/url/to/visa.png" />';
          }
          elseif ($cc == 'mc') {
               print '<img src="full/url/to/mc.png" />';
          }
          elseif ($cc == 'amx') {
               print '<img src="full/url/to/amx.png" />';
          }
   
       }
       ?>
       ```
   
 * That’s easier to follow, I think.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘[Plugin: Custom Content Type Manager] Multi-select Image’ is closed to
new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-content-type-manager_c9c790.
   svg)
 * [Custom Content Type Manager](https://wordpress.org/plugins/custom-content-type-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-content-type-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-content-type-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-content-type-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-content-type-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-content-type-manager/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [fireproofsocks](https://wordpress.org/support/users/fireproofsocks/)
 * Last activity: [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-custom-content-type-manager-multi-select-image/#post-2561434)
 * Status: not resolved