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 have a WordPress issue that has been keeping me busy for a few days.

I'm currently building a website for a client.

This website will show products and each product page also has a table with specifications of the product.

The specifications will be shown in a table like this:

http://preview.navinpoeran.com/images/tabel.jpg

What would be the best way to implement this in the template, so the client can add data for each product from the back-end?

Each product gets its own page of course.

For example:

iPhone 4S
iPhone 5
etc. (no it's not an Apple-related website, just an example)

share|improve this question
add comment

2 Answers

You could do this by adding Meta Boxes to your custom post type. Here's two URLs that explain it, it's pretty easy:

http://codex.wordpress.org/Function_Reference/add_meta_box http://wp.tutsplus.com/tutorials/integrating-with-wordpress-ui-meta-boxes-on-custom-pages/

The Meta Box just works like another field to edit on the Post edit screen so integrates really well. You should be able to layout a grid like you specified above.

You can use update_post_meta() to save your values to the database so no extra DB tables or fields are required.

share|improve this answer
add comment

Steve's answer above is the best way of doing it, of course, but if the client isn't too afraid of technology, she could also just add the required data via the standard custom field interface. Not quite as user-friendly, though. There's also the Advanced Custom Fields plugin, if you don't fancy rolling your own metaboxes.

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.