2

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?

3
  • 2
    use custom fields; create metaboxes on the editor page if you want a nicer interface for these fields Commented Jan 5, 2011 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
    Commented Jan 5, 2011 at 19:43
  • Following Ambitious Amoebas advice, i used metabox. Now i dont 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
    Commented Jan 6, 2011 at 1:31

4 Answers 4

1

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.

1

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

1
  • 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
    Commented May 7, 2011 at 16:55
1

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.

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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