Created
May 11, 2016 13:28
-
-
Save donchenko/ba0519112b57cbb5da9aae61d1fd21c7 to your computer and use it in GitHub Desktop.
Делаем вывод рубрик которые дочерние от 76й рубрики списком для виджета.
This file contains 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
<?php | |
if( $terms = get_terms( 'category', array( | |
'orderby' => 'name', | |
'hide_empty' => 0, | |
'parent' => 76, | |
) ) ) : | |
echo '<ul class="sidebar_countries\">'; | |
foreach ($terms as $term) : | |
echo '<li id="' . $term->slug. '"><a href="' . esc_url( get_term_link( $term ) ) . '">' . $term->name . '</a></li>'; | |
endforeach; | |
echo '</ul>'; | |
endif; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment