5

I am working on a problem to get the most recently used tags within the last 30 days.

My current thought process is not working, so I am trying to come up with an alternative method.

I came across get_term and get_terms, thinking they may be a way to an actual functioning solution to my problem.

However, searching for "What is the difference between terms and tags in WordPress" is too general and I cannot find an answer.

What is the difference between tags and terms? It what situations would get_term or get_terms be used?

Thanks.

2 Answers 2

1

Simple yet tough question, taxonomies are just groups of categories, while terms are just single categories within these groups.*

So, for example, if you create a new post and choose category for it - the category itself is a term, and opening YourWordpressURL/wp-admin/edit-tags.php?taxonomy=category you're going to see all the categories (taxonomy).

Terms and Tags are similar at first glance, they just work differently:

http://lorelle.wordpress.com/2005/09/09/categories-versus-tags-whats-the-difference-and-which-one/

http://www.usabilitypost.com/2008/10/17/categories-vs-tags/

*this is possibly sometimes not true, as terms don't have to be categories, but I hate word "terms", it just confuses me, categories fits better

1
  • Wordpressor and @kaiser thanks for both of your answers. It really is a simple answer, but seemingly difficult to explain. After this answer, I went into the DB structure and looked through wp_terms, wp_term_relationships and wp_term_taxonomy of my familiar website. It makes sense now. Apr 23, 2012 at 23:57
2

In general everything is a »Taxonomy«:

  • category
  • term
  • link_category
  • terms...

But there's also the difference between "hierarchical" and non-hierarchical (a.k.a. flat) Taxonomies - I guess I don't have to explain that.

4
  • 1
    Ok, but, what exactly is a is a term? Apr 23, 2012 at 23:00
  • A taxonomy name, like category or such. It equals to (for ex.) a tag.
    – kaiser
    Apr 23, 2012 at 23:09
  • So, a term is everything that is a taxonomy? Apr 23, 2012 at 23:10
  • term is just a name for a specified taxonomy. Like category. WP uses this internally to say "it´s a flat/non-hierachical custom taxonomy type". The only official word is "Taxonomy". Nothing else.
    – kaiser
    Apr 23, 2012 at 23:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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