Hot answers tagged

3

There are e.g. the following dynamic sanitize_term_fields() filters: edit_term_{$field} filter for the edit context pre_term_{$field} filter for the the db context term_{$field}_rss filter for the the rss context term_{$field} filter (default) and also the taxonomy-specific ones: edit_{$taxonomy}_{$field} filter for the edit context pre_{$taxonomy}_{$...


1

For reliability, you can get the current term being viewed from the queried object from $GLOBALS['wp_the_query'] $current_term = sanitize_term( $GLOBALS['wp_the_query']->get_queried_object() ); To answer your question, if Southern Africa is top level, it should have a parent term ID of 0. All child terms should have a numeric value as parent which ...


1

You need to use %cities% (matching the name of the taxonomy). I thought that %city% was just a placeholder with a random name. Not quite - it's called a permalink structure (permastruct) and is used to map to a regular expression. When you call register_taxonomy, it automatically registers a new permastruct with the same name as the taxonomy. Read up ...



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