Category Archives: WordPress core

Wandering Boxes: My plugin’s alert messages started moving down the page

I thought I was seeing things. When I was writing the admin page for a plugin, my notice and error boxes suddenly started moving around the page on their own. There’s an explanation for this behaviour, buried deep in the Javascript files. Continue reading

Tagged , ,

The difference between term_id and term_taxonomy_id

The Codex says:

  • term_id is the ID of a term in the terms table
  • term_taxonomy_id is a unique ID for the term+taxonomy pair

What does this mean?

A term is a word. It can belong to a taxonomy, such as tags, categories, or a custom taxonomy. The thing is: there can be several taxonomies containing the same term.

Let’s say you have a term called “fattening“. This word has an id number. This is the term_id. It doesn’t depend on how this word is used, i.e. in which taxonomies the term appears.

Now the word “fattening” as a post tag also has a number. This is the term_taxonomy_id. It corresponds to “the post tag ‘fattening’“.

Maybe you also have a category called “fattening”. While the term_id is the same, the term_taxonomy_id for “the category ‘fattening’” is different.

Got it? Simple. Or maybe not. That’s the way it is, anyway.

If this post was helpful, please let me know in the comments!

Tagged , ,

Three unbelievable things:
1. WordPress doesn’t allow adding custom “bulk actions” to the Posts screen!
2. The developers don’t seem to think this is a priority!
3. I only found out about this now 🙂
Luckily, Justin Stern has a solution. It’s hackish, but might save the day.

WordPress doesn’t allow custom “bulk actions”

Tagged ,

Funny business with add_rewrite_rule() and “external” rewrites

There’s some funny business going on when you try to add a custom rewrite rule to WordPress and it gets interpreted as an “external” rule. What’s going on? Continue reading

Tagged , ,