[wp-hackers] tags with alias power
wordpress at zed1.com
Thu Nov 15 18:33:44 UTC 2012
On 15 November 2012 17:37, Haluk Karamete <halukkaramete at gmail.com> wrote:
> Is there such a feature in WordPress, that you have one tag which is
> the alias for another?
> Muhammad Ali and Cassius Clay is the same thing. I have two separate
> tags for each. And I tag my article with Muhammad Ali only while my
> colleague tags another article that talks about Muhammad Ali as
> I guess the functionality I need here is the same as that is found in
> the back of many books. You go look up a word at the index, and you
> read something like "see XYZ" redirecting you to look up the item
> titled "XYZ", eventually getting you to the correct page.
WordPress does actually support an 'alias_of' field when creating taxonomy
terms programatically. eg:
wp_insert_term( 'Wheelchair access', 'venue_access', array( 'description'
=> 'Wheelchair / ramp access', 'slug' => 'wheelchair' ) );
wp_insert_term( 'Ramp access', 'venue_access', array( 'description' =>
'Ramp Access (same as wheelchair access)', 'slug' => 'ramp', 'alias_of' =>
'wheelchair' ) );
But I've never seen any plugin expose that functionality in the UI.
WordPress does not seem to support the capability in the way you might
expect (searching), other than to support sorting by term_group (which is
created for a group of aliases). So when retrieving a list of terms
(get_terms()), and choosing order_by 'term_group' as an argument, the
aliases will be sorted together.
I think that does mean you could add support for what you want, but I've
not seen it done.
More information about the wp-hackers