Skip Navigation

[Resolved] Custom posts or Custom fields?

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user wanted to know if its better to Divide his posts into different CPT or separate them with Custom Fields.

Solution:

In this user's case it would've been better use a custom fields to separate his posts because he intends to allow users to filter through the different types of posts. If the user separated them using CPT's then he wouldn't be able to add a filter to filter by the CPT's

This support ticket is created 6 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 6 replies, has 2 voices.

Last updated by anthonyC-8 6 years, 5 months ago.

Assisted by: Shane.

Author
Posts
#902203

I have a list of 6 resources. Each resource type can have it's own custom fields. They all share the same taxonomy. Should I create these as 6 separate custom post types or as 1?

If as 6 separate can I present them to the end user as one thing, resources? That is, the user goes to /resources and can filter and search all of the 6 different types? Can I build one page that pulls in results from 6 different post type?

Or am I better off creating one custom post type with a lot of custom fields that will be left blank for many of the posts?

#902226

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Anthony,

Thank you for contacting our support forum.

Would the 6 CPT's have its own separate set of custom fields or is it that you will have 6 custom fields that can be used to mark what that post is about.

Please let me know.
Thanks,
Shane

#902227

Hi,

They'd have their own custom fields. For example, type A might have fields A, B, C type 2 might have fields A, B, D, E and type 3 might have fields F, G, and X.

thanks,
Anthony

#902232

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Anthony,

In this case I would recommend using different CPT.

Thanks,
Shane

#902235

With this approach I could create a page that searches/filters through the different post types? For the end user they should all appear under the path /resources

Will this work?

Thanks for the help.

#902265

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Anthony,

Unfortunately not. If you want it to be filtered then using a single custom post type and then using Custom Fields or Taxonomies to differentiate them would be best.

This will allow you to setup the frontend filters for the search so user's can filter through the different types.

Thanks,
Shane

#902625

got it