lundi 10 mars 2014

Wordpress, get current level of taxonomy in an archive page


Vote count:

0




I'm creating a WordPress site to display a catalogue of items using a custom post type and a custom hierarchical taxonomy. I'd like to keep it simple and deal with the items in a single archive page, but I need help how to determine the level of taxonomy currently displayed. Basically, I need the following functionality:



if ($current_term_level = 0) {
// show first drop-down
} else if ($current_term_level = 1) {
// show second drop-down
} else {
// show third drop-down
}


Can someone please explain how to get $current_term_level to output appropriate values?



asked 29 secs ago






Aucun commentaire:

Enregistrer un commentaire