19 lines
802 B
PHP
19 lines
802 B
PHP
<?php
|
|
if (has_category('chapters')) {
|
|
$romans = get_the_terms($post->ID, 'roman');
|
|
foreach( $romans as $roman ) {
|
|
echo "<a href= '" . esc_url( get_category_link( $roman->term_id ) ) . "' class='btn-small btn-info'><i class='fa fa-book'></i> " . $roman->name . "</a>";
|
|
}
|
|
} else {
|
|
$categories = get_the_category();
|
|
foreach( $categories as $category ) {
|
|
echo "<a href= '" . esc_url( get_category_link( $category->term_id ) ) . "' class='btn-small btn-info'><i class='fa fa-folder'></i> " . $category->cat_name . "</a>";
|
|
}
|
|
}
|
|
$tags = get_the_tags();
|
|
if ($tags) {
|
|
foreach( $tags as $tag ) {
|
|
echo "<a href= '" . esc_url( get_tag_link( $tag->term_id ) ) . "' class='btn-small btn-primary'><i class='fa fa-tag'></i> " . $tag->name . "</a> ";
|
|
}
|
|
}
|
|
?>
|