I have to create a hundred of content pages that share the same structure.

For example:

[Title] - [Subtitle]



 - [Spec-A]
 - [Spec-B]
 - [Spec-C]


 - [Image-A][Feature-A]
 - [Image-A][Feature-B]
 - [Image-A][Feature-C]

I would like to store this information in some DB tables so that if I need to change the template content positions or style, I can do it once for all pages.

But unfortunately I am not very good at PHP, so I don't know where to start. Which features of Wordpress or plugins can I use to reach the result?

Thank you in advance


You might want to consider creating a Custom Post Type for this product (I assume it's some sort of product), and then adding custom metaboxes, that will store the custom data (specs, features, etc.) as metadata for each Post.

Then, your custom template file becomes "single-.php" (e.g. "single-product.php"), and you can structure the markup however you need.

Storing the custom data (specs, features, etc.) as post metadata allows you to retrieve these data using get_post_meta() (Codex ref) or get_post_custom() (Codex ref).

  • Can you please explain a little more about "custom metaboxes"?
    – Drake
    Apr 18 '11 at 11:51
  • @Drake - They are exactly the same as normal metaboxes, but you can define what's inside them. I updated the codex example with an OOP example (2nd) some days ago: codex.wordpress.org/Function_Reference/add_meta_box#Example - So just add the fields you need and pull them into your template as chip said.
    – kaiser
    Apr 18 '11 at 12:30

Some plugins that will help you, I reviewed some custom post type/meta box plugins a while back and I consider these very solid:

Custom Post Type UI http://wordpress.org/extend/plugins/custom-post-type-ui/

Pods CMS (php knowledge required) http://wordpress.org/extend/plugins/pods/

Custom Field Template http://wordpress.org/extend/plugins/custom-field-template/

Multiple content blocks http://wordpress.org/extend/plugins/multiple-content-blocks/

WordPress Reusables http://wordpress.org/extend/plugins/reusables/

  • I will need some time to check them all. At the moment I am testing Custom Field Template and it seems nice.
    – Drake
    Apr 19 '11 at 11:19

I am a huge fan of More Types, More Fields, and More Taxonomies. I had to do the exact thing you're looking to do, and quickly. I was able to create custom pages and posts without compromising the defaults. Once I created the custom types I then created custom page/post templates (page-documents.php) and pulled the information into them with something similar to this. <?php echo get_post_meta($post->ID, "document-description", true); ?>

enter image description here

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.