Created
September 6, 2016 13:31
-
-
Save amin3d/afd4a6f6a7766b8f63912df6706ce58d to your computer and use it in GitHub Desktop.
get term child
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_term_child($tax,$slug) | |
{ | |
$term=get_term_by('slug', $slug, $tax); | |
return get_term_link($term); | |
/* $terms = get_terms($tax); | |
foreach ($terms as $term) { | |
if($term->slug==$slug) | |
return get_term_link($term); | |
} | |
return '';*/ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment