Tag Info

Hot answers tagged

3

I use template_redirect hook for this purpose. I suppose rented in your question is not taxonomy itself, but one term of some taxonomy. function my_page_template_redirect() { if( is_singular( 'rentals' ) && has_term('rented', 'your taxonomy name') ) { wp_redirect( home_url(), 301 ); exit(); } } add_action( ...


1

It appears to be because I was using the Advanced Custom Fields plugin, which has a seperate taxonomy option that was overriding the standard.


1

Okay, I managed to track down the answer, with help from the "Debug This" plugin and investigating the coding of the "Beautiful Taxonomy Filters" plugin. So far as I can find, Wordpress saves full details (including Title, ID and Slug) of only the first taxonomy and first term queried. For any additional terms or taxonomies queried, Wordpress saves only ...


1

Strictly regarding your question: get_object_taxonomies( 'user' ); since user is the $object_type that it is used when the author registers the taxonomy.


1

There are quite a few steps involved here and also, with that 5000 posts figure you are mentioning, this will be an expensive task to do it through WordPress itself. However, here is what I came up with (I haven't tested this so you may wish to use it on a backup first and see if it works): global $wpdb; /* The ( 'from_term_id', 'to_term_id' ) map. */ ...



Only top voted, non community-wiki answers of a minimum length are eligible