55 lines
1.2 KiB
PHP
55 lines
1.2 KiB
PHP
<?php
|
|
/**
|
|
* Template Name: Arxiu artistes per anys
|
|
*
|
|
* Seccions de pàgines índex amb contingut i fills, però el contingut presentat com un índex
|
|
* @link http://themehybrid.com/themes/hybrid/page-templates/categories
|
|
*
|
|
* @package Hangar
|
|
* @subpackage Template
|
|
*/
|
|
|
|
get_header();
|
|
?>
|
|
|
|
<!-- index pàgina pare-->
|
|
|
|
<div id="main">
|
|
<div id="content" class="seccio unic">
|
|
<div id="pagina" class="shadow">
|
|
|
|
<h2><?php echo get_the_title();?></h2>
|
|
|
|
<?php
|
|
$terms = get_terms('anys');
|
|
if (count($terms)) {
|
|
echo "<ul id='artistes'>";
|
|
}
|
|
foreach ($terms as $term) {
|
|
$wpq = array ('taxonomy'=>'anys','term'=>$term->slug);
|
|
$query = new WP_Query ($wpq);
|
|
$article_count = $query->post_count;
|
|
echo "<li class=\"term-heading\">";
|
|
if ($article_count) { ?>
|
|
<a href="<?php echo get_site_url() . '/anys/' .$term->slug .'/';?>">
|
|
<? echo $term->name; ?>
|
|
<span class="count">
|
|
<? echo $article_count; _e(" artists", "hangar");?>
|
|
</span>
|
|
</a>
|
|
<?php
|
|
} else {
|
|
echo $term->name;
|
|
}
|
|
echo "</li>";
|
|
}
|
|
if (count($terms)) {
|
|
echo "</ul>";
|
|
}
|
|
?>
|
|
</div><!-- .pagina -->
|
|
</div><!-- .content -->
|
|
</div><!--end Main-->
|
|
|
|
<?php get_footer(); ?>
|