0

I'm wanting to create a custom post type that can upload 2 images to display on the home page of a website. How would I attempt this? The images needs to be displayed underneath each other.

Thanks!

2
  • Are you willing to create a custom post-type that enables user to upload 2 images and show them on homepage ? Could you please provide more details on what exactly you're looking for.
    – amit
    Jul 30 '12 at 7:05
  • Hi, Thanks for your reply. I want to create a custom post type in it's own section below pages and posts (in admin) where the user uploads 2 images. Then the two images uploaded will be displayed on the right hand side of the home page. So on the home page (image 1) and then (image 2) displayed below. The point of this is so that they can change the image regularly and have it displayed on the home page. So far the two images have been hard coded into the template and they can't change it themselves. Jul 30 '12 at 23:55
0

Use this plugin http://wordpress.org/extend/plugins/types/

Add two custom fields to upload image. Assign this custom fields to custom post. Use short code to display it.

Other simple solution is to use custom fields for images.And display them where you want.

1
  • This has worked great so far! It seems to not like a custom post type I have displayed above it though. Is this common? Jul 31 '12 at 5:13
0

Unless hacked, all post types have upload capabilities.

This kind of doubt are easily solved reading the documentation.

Working with Images

http://codex.wordpress.org/Using_Images
WordPress makes it easy to add images to your WordPress site. You can upload them from within WordPress using the built-in file uploading utility in the Posts screen. [...]

.

Inserting Images into Posts and Pages

http://codex.wordpress.org/Inserting_Images_into_Posts_and_Pages
WordPress makes it easy to add images to your content. Images can be used in your pages or your posts directly.
You also can use the insert picture icon to insert a picture that you want to link to, without uploading to your server. [...]

0

You will need a meta box in a custom post type in which case this tutorial will come handy http://wptheming.com/2010/08/custom-metabox-for-post-type/

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.