0

While developing a multipupose theme for mass audience, i’m facing an issue.

I’m going to code staff listing section. Now i was wondering, what should i do?

1: Create dedicated Custom Post Type for staff; or

2: Create Shortcode for it.

Now each decision has some pros and cons.

a) Custom Post Type:

  • Centralization, can call same group of listing on mutiple places without defining each time.
  • Better staff order managerment
  • No need to enter detail page link specifically
  • Taxonomy support, so better hierarchy
  • cons: dedicated CPT for it might be an overkill

b) Shortcode Approach:

  • cons: cannot do anything with current shortcode generator which are described above and there would be too many fields in shortcode generator.
  • pro: less messy WordPress sidemenu

Now is the best approach in this context?

closed as primarily opinion-based by Chip Bennett, Wyck, gmazzap, s_ha_dum Jan 29 '14 at 0:17

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

0

If building a multipurposetheme (Hello Themeforest!), I would always use a Custom Post Type for something like this.

The reason is, as you already mentioned in your shortcode approach, you have too many fields and variables even in the beginning. Then, to have your Theme serve as many customers as possible, you have to add a ton of options to it, so your fields in the shortcodegenerator become uncountable.

Using the Custom post type gives you all the advantages you managed, plus one important thing to keep in mind: A custom Post Type is not an overkill. Usually. But in 99% of the cases it is just more elegant to go that way. Starting from the ability to query them, use them in various places, include them into your sitemap, a clean interface etc., there are a ton of reasons i would choose a CPT over a shortcodebased System.

Another thing to keep in mind, as you list the less messy sidemenu as a pro for the shortcodes: Build a nice Theme Option panel with the ability to deactivate your Custom Post Types. Not everyone needs a Portfolio, not everyone needs Staff.

With this ability for the User of your theme, you can speed up the performance and enhance the user experience.

And if you need a shortcode - you can also add it to display your Post Types. Nice and structured.

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