Пример #1
0
		<div class="site-branding">
			<h1 class="site-title"><a href="<?php 
echo esc_url(home_url('/'));
?>
" title="<?php 
echo esc_attr(get_bloginfo('name', 'display'));
?>
" rel="home"><?php 
bloginfo('name');
?>
</a></h1>
			<h2 class="site-description"><?php 
bloginfo('description');
?>
</h2>
		</div>

		<nav id="site-navigation" class="main-navigation" role="navigation">
			
			<?php 
wp_nav_menu(array('theme_location' => 'primary'));
?>
		</nav><!-- #site-navigation -->
	</header><!-- #masthead -->

	<div id="main" class="site-main">
	<!-- / ÖRNEK HEADER: SİLİNEBİLİR-->

<?php 
$taxTree = getTermFamily(2, 'category');
Пример #2
-1
function getTermFamily($termId, $taxonomy = 'category', $childArgs = array(), $level = 0)
{
    //get this items first then recurse into children
    $current = new Dion\TaxonomyHierarchy($termId, $taxonomy, $childArgs);
    ?>
    <p style="padding-left:<?php 
    echo ($level + 1) * 10;
    ?>
px;"  >
        <a href="<?php 
    echo get_term_link($current->tree['current']);
    ?>
"><?php 
    echo $current->tree['current']->name;
    ?>
</a>
    </p>
        <?php 
    //get child term list
    if ($current->hasChildren) {
        $newLevel = $level + 1;
        foreach ($current->tree['children'] as $childTerm) {
            getTermFamily($childTerm->term_id, $childTerm->taxonomy, array(), $newLevel);
        }
    }
    ?>

    <?php 
}