get second taxonomy term name inside php file
-
hello,
can we add second taxonomy name inside page template ?
for example i have a php file that contains
<?php echo '<h1>' . single_term_title( "", false ) . '</h1>'; ?>
to show the “Type” taxonomy terms title inside it’s pages.
for example for this url: domain.com/tracks/type/music/
it shows “music” as H1 in page.
but for this url
domain.com/tracks/type/music/artist/test1/
it shows “Music” as H1 too.
is there any way i can change H1 on this url to something like : “Music: Test1” ?
(Music: a term of “type” taxonomy and test1 a term of “artist” taxonomy).
can i detect the page url has two taxonomy and get each taxonomy terms name in php ? or any other way ?
i’ll appreciate any hint
Thanks.
- The topic ‘get second taxonomy term name inside php file’ is closed to new replies.