Skip Navigation

[Résolu] Understanding purpose of checkbox custom field vs custom taxonomy

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem: I would like to understand the advantages of using a single checkbox custom field as opposed to using a single term in a custom taxonomy. I would also like to know if it's possible to migrate a custom field checkbox to be a single term in a custom taxonomy.

Solution: The advantage of a checkbox vs. a taxonomy term are a bit subjective. When you create Query Filters in wp-admin, you can create more powerful filters for custom fields than you can create for terms, but in practical use that's probably not a real advantage. You could argue that it's less likely for other site admins to be able to create a problem by adding other terms to this custom taxonomy. It's also easier to set up a checkbox field that doesn't have a term archive associated with it, since taxonomy terms are usually set up to have archives by default. You can assign custom fields to a many-to-many relationship, while it's not always easy to assign a taxonomy term to that same relationship. Managing this checkbox status in Forms might be a challenge if it's set up as a flat taxonomy because there's no simple checkbox input for flat taxonomies. You would have to type the term name.

Those are the main things I can think of right now. Migrating a checkbox to a term would require custom code, a custom SQL statement that directly manipulates the database, or some manual intervention in a CSV export / import process.

This support ticket is created Il y a 4 années et 11 mois. 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Marqué : 

This topic contains 2 réponses, has 2 voix.

Last updated by martinE-4 Il y a 4 années et 11 mois.

Assisted by: Christian Cox.

Auteur
Publications
#1245417

Recently I migrated a Drupal site to WordPress using the Types plugin with FG Drupal to WordPress migration plugin. It worked well to import my content to WordPress, several custom post types and numerous custom fields.

One of the custom fields created was a checkbox custom field. I think I would prefer using a custom category taxonomy for the simplicity of a taxonomy. And the advantages of changing a taxonomy name for example and instantly seeing that update for all posts.

What are the advantages of using the Types checkbox custom field? I've never used them. Always a custom taxonomy.

If I want to switch the data in my (roughly) 500 posts from the Types checkbox custom field to a custom taxonomy is there a way to do that?

many thanks

#1245468

What are the advantages of using the Types checkbox custom field? I've never used them. Always a custom taxonomy.
The advantage of a checkbox vs. a taxonomy term are a bit subjective. When you create Query Filters in wp-admin, you can create more powerful filters for custom fields than you can create for terms, but in practical use that's probably not a real advantage. You could argue that it's less likely for other site admins to be able to create a problem by adding other terms to this custom taxonomy. It's also easier to set up a checkbox field that doesn't have a term archive associated with it, since taxonomy terms are usually set up to have archives by default. You can assign custom fields to a many-to-many relationship, while it's not always easy to assign a taxonomy term to that same relationship. Managing this checkbox status in Forms might be a challenge if it's set up as a flat taxonomy because there's no simple checkbox input for flat taxonomies. You would have to type the term name.

Those are the main things I can think of right now.

If I want to switch the data in my (roughly) 500 posts from the Types checkbox custom field to a custom taxonomy is there a way to do that?
No, this would require custom code, a custom SQL statement that directly manipulates the database, or some manual intervention in a CSV export / import process.

#1246213

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.