Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I made a new custom type, it's working fine. My question is: If i want to add in a single post that custom-type with different informations for about x times...how should I do this?

Example:
Let's say I have "Reduced Price Laptops," with:

  • Name
  • Price
  • Image
  • Description

I want to make a post where I will post 4 laptops and I want to fill 4 different informations. I want them to be posted in the same article, not 4 separately. Each of them will show up styled separately, but with same design. Let's say a little box.

Any ideas/sugestions?

share|improve this question
2  
use custom fields; create metaboxes on the editor page if you want a nicer interface for these fields –  onetrickpony Jan 5 '11 at 17:22
    
And how can i make unlimited metaboxes? Since on some posts i will have just 4 laptops and on others maybe 10 or more? –  Iulian Jan 5 '11 at 19:43
    
Following Ambitious Amoeba`s advice, i used metabox. Now i don`t know how to add a button "New Laptop", so a new metabox with same fields will be added. I want to do this as many times as I want, since sometimes i will need 2 laptops, sometimes just one or more. –  Iulian Jan 6 '11 at 1:31
add comment

4 Answers

Iulian, from what you write in your question, you're basically looking for a CMS that offers data configuration, editing and presentation out of the box.

Even WordPress can be used to manage content and build wonderfull things, it does not support such out of the box easily. It does not mean that it is not possible to do that what you ask for, it's just a very individual solution you should find a coder that is programming what you need.

Would be great if you share the result back here.

share|improve this answer
add comment

I do not think that I will find a solution to this soon. The only thing that i managed to make until now, it`s this metabox. So basically, i will just need that Add new laptop button

alt text

share|improve this answer
    
You basically need to do what Magic Fields does with meta boxes, use javascript to duplicate the meta box and handle it as an array on the back end. –  Milo May 7 '11 at 16:55
add comment

You'll probably want to take a look at this plugin:

http://wordpress.org/extend/plugins/posts-to-posts/

It doesn't provide the UI you want, but at least you have the underlying data structure handled.

share|improve this answer
add comment

Iulian, I think the best solution is to have one laptop per post, and then program your pages to have different numbers of laptops based on your needs. You can create a blank page in WP and then set it to use a custom page template. Code that template with a query to grab only certain laptops, and then they will all go that page.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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