191 lines
12 KiB
PHP
191 lines
12 KiB
PHP
<li id="post-<?php the_ID(); ?>" <?php echo 'class ="boxentry ' . $tipus . '"'; ?>>
|
|
|
|
<!-- les pàgines fixes (no categories ni artistes) -->
|
|
<?php if ((!$category) and ($tipus == 'pag')) : ?>
|
|
<h2 class="box <?php echo $tipus;?>"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'hangar' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title() ;?> </a> </h2>
|
|
<?php $contingut = get_the_content_with_formatting(); //funció que està a functions.php permet mostrar links i html del contingut, client ho volia ?>
|
|
<div class="contingut plus">
|
|
<?php echo $contingut; ?>
|
|
</div>
|
|
<div class="boxpeu" >
|
|
<a href="<?php the_permalink(); ?>" class="peubox" title="<?php printf( esc_attr__( 'Permalink to %s', 'hangar' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><img alt="enllaç" src="<?php echo get_template_directory_uri() . '/images/fletxalinkblanca.png';?>" /></a>
|
|
</div>
|
|
|
|
<!-- els artistes -->
|
|
<?php elseif ((!$category) and (($tipus == 'art')) or ($tipus == 'obra')): ?>
|
|
|
|
<div class="head-entry">
|
|
<?php if (is_home()) : ?>
|
|
<span class='cat'>
|
|
<a href="<?php echo get_permalink(2);?>"><?php echo get_the_title(2);?></a>
|
|
</span>
|
|
<h2 class="box <?php echo $tipus;?>"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'hangar' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title() ;?> </a> </h2>
|
|
<?php else : ?>
|
|
<h3 class="box <?php echo $tipus;?>"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'hangar' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title() ;?> </a> </h3>
|
|
<?php endif;?>
|
|
</div>
|
|
<?php if ($tipus == 'art') : ?>
|
|
<p class="meta box"><?php echo get_post_meta($post->ID, 'autor_data_resid', true) ?></p>
|
|
<?php else : ?>
|
|
<p class="meta box"><?php echo get_post_meta($post->ID, 'data_obra', true) ?></p>
|
|
<?php endif; ?>
|
|
<?php if ( has_post_thumbnail() ) : ?>
|
|
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" >
|
|
<?php the_post_thumbnail('artists-thumb'); ?>
|
|
</a>
|
|
<?php else : ?>
|
|
<img class="noimatge gran" width="200" height="230" title="imatge no disponible" alt="imatge no disponible" src="<?php echo get_template_directory_uri() .'/images/noimatgegran.jpg';?>" />
|
|
<?php endif; ?>
|
|
|
|
<div class="boxpeu" >
|
|
<!-- la fletxeta link al post/pàgina -->
|
|
<a href="<?php the_permalink(); ?>" class="peubox" title="<?php printf( esc_attr__( 'Permalink to %s', 'hangar' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><img alt="enllaç" src="<?php echo get_template_directory_uri() . '/images/fletxalink.png';?>" /></a>
|
|
|
|
<?php if (is_home()) : ?>
|
|
<!-- els quadrets link a la categoria pare -->
|
|
<a href="<?php echo get_permalink(2); ?>" class="peudret" title="<?php echo get_the_title(2); ?>" rel="bookmark"><img alt="enllaç a la categoria" src="<?php echo get_template_directory_uri() . '/images/totslink.png';?>" /></a>
|
|
<?php endif; ?>
|
|
|
|
</div>
|
|
<!-- EQUIP -->
|
|
<?php elseif ((!$category) and ($tipus == 'equip')):
|
|
$carrec = get_post_meta($post->ID, 'carrec', true);
|
|
$email = get_post_meta($post->ID, 'email', true);
|
|
$telefon = get_post_meta($post->ID, 'telefon', true);
|
|
?>
|
|
<div class="head-entry"> <!-- els equips només són índex, no tenen enllça a pàgina ni peu-->
|
|
<h3 class="equip <?php echo $tipus;?>"><?php the_title() ;?> </h3>
|
|
<p class="carrec"><?php echo $carrec; ?> </p>
|
|
</div>
|
|
<p class="boxcurta"><?php echo $telefon; ?> </p>
|
|
<p class="meta box"><?php echo $email; ?> </p>
|
|
|
|
<?php if ( has_post_thumbnail() ) : ?>
|
|
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" >
|
|
<?php the_post_thumbnail('thumbnail'); ?>
|
|
</a>
|
|
<?php else : ?>
|
|
<img class="noimatge gran" width="200" height="150" title="imatge no disponible" alt="imatge no disponible" src="<?php echo get_template_directory_uri() .'/images/noimatge.jpg';?>" />
|
|
<?php endif; ?>
|
|
|
|
<?php if (has_excerpt()) : ?>
|
|
<p class="excerptbox"><?php echo get_the_excerpt(); ?></p>
|
|
<?php else :?>
|
|
<div class="contingut curt"><?php echo get_the_content_with_formatting(); ?></div>
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
<!-- els descarregables -->
|
|
<?php elseif ((!$category) and ($tipus == 'desc')): ?>
|
|
|
|
<div class="head-entry">
|
|
<?php if (is_home()) : ?>
|
|
<span class='cat'>
|
|
<a href="<?php echo get_permalink(136);?>"><?php echo get_the_title(136);?></a>
|
|
</span>
|
|
<h2 class="box <?php echo $tipus;?>"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'hangar' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title() ;?> </a> </h2>
|
|
<?php else : ?>
|
|
<h3 class="box <?php echo $tipus;?>"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'hangar' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title() ;?> </a> </h3>
|
|
<?php endif;?>
|
|
|
|
</div>
|
|
|
|
<?php if (has_excerpt()) : ?>
|
|
<p class="excerptbox"><?php echo get_the_excerpt(); ?></p>
|
|
<?php else :?>
|
|
<div class="contingut llarg"><?php echo get_the_content_with_formatting(); ?></div>
|
|
<?php endif;?>
|
|
|
|
<!-- la fletxeta link al post/pàgina -->
|
|
<div class="boxpeu">
|
|
<a href="<?php the_permalink(); ?>" class="peubox" title="<?php printf( esc_attr__( 'Permalink to %s', 'hangar' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><img alt="enllaç" src="<?php echo get_template_directory_uri() . '/images/fletxalink.png';?>" /></a>
|
|
<!-- els quadrets link a la categoria pare -->
|
|
<a href="<?php echo get_permalink(136); ?>" class="peudret" title="<?php echo get_the_title(136); ?>" rel="bookmark"><img alt="enllaç a la categoria" src="<?php echo get_template_directory_uri() . '/images/totslink.png';?>" /></a> <?php ?>
|
|
</div>
|
|
|
|
<!-- el claendari -->
|
|
|
|
<?php elseif ( in_category( '13') || post_is_in_descendant_category( '13') ) : //calendari
|
|
$dataobra = get_post_meta($post->ID, 'data_activitat', true);
|
|
$llocacte = get_post_meta($post->ID, 'lloc_activitat', true);
|
|
$horari = get_post_meta($post->ID, 'horari_activitat', true);
|
|
$sicalendari = true; ?>
|
|
<div class="head-entry">
|
|
<?php if (is_home()) : ?>
|
|
<span class='cat'>
|
|
<h2 class="blau"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'hangar' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title() ;?> </a> </h2>
|
|
</span>
|
|
<?php else : ?>
|
|
<span class='cat'>
|
|
<h3 class="box" ><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'hangar' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title() ;?> </a> </h3>
|
|
</span>
|
|
<?php endif; ?>
|
|
<p class="box <?php echo $tipus;?>"><?php echo $llocacte;?></p>
|
|
</div>
|
|
<p class="meta box"><?php echo get_post_meta($post->ID, 'data_activitat', true) ?></p>
|
|
<p class="meta horari box"><?php echo get_post_meta($post->ID, 'horari_activitat', true) ?></p>
|
|
<?php if (has_excerpt()) : ?>
|
|
<p class="excerptbox"><?php echo get_the_excerpt(); ?></p>
|
|
<?php else :?>
|
|
<div class="contingut mig"><?php echo get_the_content_with_formatting(); ?></div>
|
|
<?php endif;?>
|
|
<div class="boxpeu" >
|
|
<a href="<?php the_permalink(); ?>" class="peubox" title="<?php printf( esc_attr__( 'Permalink to %s', 'hangar' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><img alt="enllaç" src="<?php echo get_template_directory_uri() . '/images/fletxalink.png';?>" /></a>
|
|
<!-- els quadrets link a la categoria pare -->
|
|
<a href="<?php echo get_permalink(13); ?>" class="peudret" title="<?php echo get_the_title(13); ?>" rel="bookmark"><img alt="enllaç a la categoria" src="<?php echo get_template_directory_uri() . '/images/totslink.png';?>" /></a> </div>
|
|
|
|
<!-- resta de categories -->
|
|
|
|
<?php else : ?>
|
|
|
|
<div class="head-entry">
|
|
<?php if (is_home()) : ?>
|
|
<span class='cat'>
|
|
<a href="<?php echo get_category_link( $category[0]->term_id );?>"><?php echo $category[0]->name;?></a>
|
|
</span>
|
|
<h2 class="box <?php echo $tipus;?>"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'hangar' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php echo the_title();?> </a> </h2>
|
|
<?php else : ?>
|
|
<?php if (has_subcategories($catt2)) : ?>
|
|
<span class='cat'> <!-- atenció cal assingar cada post a la subcategoria, sinó sortirà la categoria pare -->
|
|
<a href="<?php echo get_category_link( $category[0]->term_id );?>"><?php echo $category[0]->name;?></a>
|
|
</span>
|
|
<h3 class="box <?php echo $tipus;?>"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'hangar' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php echo the_title();?> </a> </h3>
|
|
<?php else : ?>
|
|
<h3 class="box nosub<?php echo $tipus;?>"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'hangar' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php echo the_title();?> </a> </h3>
|
|
<?php endif;?>
|
|
<?php endif; ?>
|
|
</div>
|
|
<?php if (get_post_meta($post->ID, 'data_activitat', true) ) : ?></p>
|
|
<p class="meta box"><?php echo get_post_meta($post->ID, 'data_activitat', true) ?></p>
|
|
<?php else: ?>
|
|
<p class="meta box">Publicat el <?php the_time('d F Y') ?></p>
|
|
<?php endif;?>
|
|
|
|
<?php if ( has_post_thumbnail() ) : ?>
|
|
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" >
|
|
<?php the_post_thumbnail('thumbnail'); ?>
|
|
</a>
|
|
<?php else : ?>
|
|
<img class="noimatge" width="200" height="150" title="imatge no disponible" alt="imatge no disponible"
|
|
src="<?php echo get_template_directory_uri() .'/images/noimatge.jpg';?>" />
|
|
<?php endif; ?>
|
|
<?php if (has_excerpt()) : ?>
|
|
<p class="excerptbox"><?php echo get_the_excerpt(); ?></p>
|
|
<?php else :?>
|
|
<div class="contingut curt"><?php echo get_the_content_with_formatting(); ?></div>
|
|
<!-- <p class="excerptbox"><?php echo wp_trim_excerpt(); ?></p>-->
|
|
<?php endif; ?>
|
|
<!--
|
|
<div class="contentllarg"><?php echo get_the_content_with_formatting(); ?></div>-->
|
|
<div class="boxpeu" >
|
|
<a href="<?php the_permalink(); ?>" class="peubox" title="<?php printf( esc_attr__( 'Permalink to %s', 'hangar' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><img alt="enllaç" src="<?php echo get_template_directory_uri() . '/images/fletxalink.png';?>" /></a>
|
|
<?php if (is_home()) : ?>
|
|
<!-- els quadrets link a la categoria pare -->
|
|
<a href="<?php echo get_category_link( $category[0]->term_id ); ?>" class="peudret" title="<?php echo $category[0]->name; ?>" rel="bookmark"><img alt="enllaç a la categoria" src="<?php echo get_template_directory_uri() . '/images/totslink.png';?>" /></a>
|
|
<?php endif;?>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
</li><!-- post .hentry -->
|