Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="fichacat"><b>Categoria</b></div>
- <?php
- foreach((get_the_category()) as $childcat) {
- $parentcat = $childcat->category_parent;
- if( $parentcat != 0 ) echo '<a href="' . get_category_link($parentcat) .'"><div class="fichavalue">' .get_cat_name($parentcat) .'</div></a>';
- }
- ?>
- <div class="fichacat"><b>Sub-Categoria</b></div>
- <?php $child_category = post_child_category(get_the_ID()); ?>
- <a href="<?php echo get_category_link($child_category->cat_ID); ?>" title="<?php echo $child_category->cat_name;?>"><div class="fichavalue">
- <?php echo $child_category->cat_name;?>
- </div></a>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement