I’m going to build a website where the main landing pages will be categories and product filters.

For example we will have a product website, where each product may have many different attributes (ex: product category is Jeans, attributes (filters) for this category/products are: color, material, size, etc., just like any e-commerce website). But I simply need only categories with filters, most of the products will be generated automatically, by using different APIs, some will be added manually like normal posts.

So the main question is how to organize this structure for attributes?

  1. Use Custom Taxonomies with Terms for attributes like Woocommerce does, but in this case I need a lot of coding to make all this compact view in Admim and also it may have a performance impact when we will have too many taxonomies and terms. Also I don’t like the idea to create a new Taxonomy for each attribute, In this case I will have too many taxonomies.
  2. Use Custom Fields and then by using query_vars filter build Permalinks, Query Vars and URL Rewriting, etc.

Perhaps I will even use ACF PRO plugin to simplify admin coding.

So what do you think which option is better, have best performance and is the good practice?

Thanks in advance.

PS:
Don’t want to use WC, because don’t need all these functions. Need something simple with less code.

2 Answers
2

Finally after the holidays I returned back to this question.

I chose to use Custom Taxonomies instead of Custom Fields.

Here is why:

  1. It’s faster to make different queries (even if I will not have many posts)
  2. Most of these attributes are reusable (shared)
  3. They may be changed/modified easily in the future
  4. I’m not going to have too long list of Taxonomies

Here’re some links:

  • https://wpshout.com/organizing-wordpress-data-custom-taxonomies-custom-fields/
  • http://ottopress.com/2011/when-to-not-use-a-custom-taxonomy/
  • http://alexking.org/blog/2011/08/29/wordpress-post-meta-taxonomies

Leave a Reply

Your email address will not be published. Required fields are marked *