0

I have a custom page type set up called 'Products' and I need each of these post to automatically have multiple custom fields to set up a table of features/prices for the individual product pages.

Is there any way this can be done? Thanks.

3
  • Sure it's possible. Are you just wanting "placeholder" custom fields, i.e. with blank values? Feb 3, 2011 at 20:09
  • I think he means custom meta boxes?
    – Bainternet
    Feb 3, 2011 at 20:25
  • Jared check out the "More Fields" plugin: wordpress.org/extend/plugins/more-fields ... it basically extends the existing custom field functionality into something a little more useful(give it a shot)..
    – t31os
    Feb 4, 2011 at 0:03

2 Answers 2

2

I too had a question about this. Luckily, Chris_O answered it for me. You may also want to check out this question, too.

Here's an example of what I've done with meta boxes and you can see it's quite easy.

Example Post Type

2

Using custom fields on custom post types is a pretty common task. What you essentialy need to do is adding a metabox and saving the values to the database. There already are some pretty good explanations of how to achieve what you want to do.

You should check out the official documentation of add_meta_box(), there's a fully working example in there!

― André

1
  • He said page types, not post types.
    – Alex
    Sep 5, 2016 at 4:09

Your Answer

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

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