I’m looking to port a site into WordPress that contains not just an About page, but an entire About section with various pages highlighting particular details about the company. Each of these pages vary in terms of layout and content but none are what could be described as being amendable to a custom post type. This is mainly because the site should only have one instance of each of these pages at any given time.
So I’m looking for some advice on how to handle pages like these. As far as I know the two options are custom templates and custom post types, but both seem to have drawbacks:
- custom templates would allow the author to make pages and associate them to the appropriate template, but I’d like to add extra metaboxes for certain aspects of these pages. But it seems (correct me if I’m wrong) adding metaboxes to pages would apply them to all pages.
- custom post types – I could define a custom post type for each ‘type’ of about page. This would give me my metabox flexibility but this seems like a ‘heavy’ approach. Also, not sure I could establish parent/child pages within a CTP?
Any advice on the best approach here? I’m leaning towards CTPs but would love to know of any best-practices for these types of pages.
Thanks in advance
“advice on the best approach” questions do not make for very good questions here as they tend to be pretty broad and subject to opinion, but I’ll give you some options and hope for the best.
Option 1:
You should be able to use ordinary pages for this. Create templates for your custom content just as you are considering in your first option. Then you can conditionally add metaboxes based on those template choices.
Option 2 :
You can do essentially the same thing with a CPT and a dedicated post type might prove to be more convenient.
Option 3 :
Instead of switching based on a template choice you could switch based on a post title, ID, or create a meta box with a “master” switch that would let you pick the meta box “set” that you want to enable.
Actually, by using the Advanced Custom Fields plugin, you can add metaboxes to just a certain page template.