2021-02-18 14:09:56 +01:00
< li id = " post-<?php the_ID(); ?> " < ? php echo 'class ="boxentry ' . $tipus ; if ( in_category ( " destacado " )) echo ' destacat' ; echo '"' ; ?> >
< ? php if (( ! $category ) and ( $tipus == 'pag' )) : ?>
2022-11-03 17:01:39 +01:00
<!-- les pàgines fixes ( no categories ni artistes ) -->
2022-09-23 12:32:45 +02:00
< article class = " not-category tipus-pag " >
2022-09-23 19:25:58 +02:00
< div class = " head-entry " >
< 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 >
</ div >
2022-09-23 12:32:45 +02:00
< div class = " contingut plus " >
2022-09-23 19:09:38 +02:00
< a href = " <?php the_permalink(); ?> " title = " <?php the_title_attribute(); ?> " >
< ? php the_post_thumbnail ( 'thumbnail' ); ?>
</ a >
2022-09-23 19:25:58 +02:00
< ? php //the_excerpt(); ?>
< ? php echo hangar_trim_excerpt (); ?>
2022-09-23 12:32:45 +02:00
</ div >
< div class = " boxpeu " >
2022-09-27 15:10:30 +02:00
< a href = " <?php the_permalink(); ?> " class = " peubox read-more " 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 >
2022-09-23 12:32:45 +02:00
</ div >
</ article >
2022-07-19 00:27:21 +02:00
2021-02-18 14:09:56 +01:00
< ? php elseif (( ! $category ) and (( $tipus == 'art' )) or ( $tipus == 'obra' )) : ?>
2022-11-03 17:01:39 +01:00
<!-- els artistes -->
2022-09-23 12:32:45 +02:00
< article class = " not-category tipus-art tipus-obra tipus-artistes " >
< 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 >
2022-07-19 00:27:21 +02:00
2022-09-23 12:32:45 +02:00
< ? php if ( $tipus == 'art' ) : ?>
2022-11-03 17:01:39 +01:00
<!-- es artiste -->
2022-09-23 12:32:45 +02:00
< ? php if ( get_post_meta ( $post -> ID , 'autor_tipo_resid' , true ) && get_post_meta ( $post -> ID , 'autor_data_resid' , true )) : ?>
< p class = " meta box " >
< ? php echo __ ( get_post_meta ( $post -> ID , 'autor_tipo_resid' , true )) ?>
< br />
< ? php echo __ ( get_post_meta ( $post -> ID , 'autor_data_resid' , true )) ?>
</ p >
2022-09-23 19:09:38 +02:00
< ? php else : ?>
2022-09-23 12:32:45 +02:00
< p class = " meta box novista " ></ p >
< ? php endif ; ?>
2022-07-19 00:27:21 +02:00
< ? php else : ?>
2022-09-23 12:32:45 +02:00
< p class = " meta box " >< ? php echo get_post_meta ( $post -> ID , 'data_obra' , true ) ?> </p>
2022-09-12 10:49:39 +02:00
< ? php endif ; ?>
2022-09-23 12:32:45 +02:00
< ? php if ( has_post_thumbnail () ) : ?>
< div class = " contingut " >
2022-09-23 19:09:38 +02:00
< a href = " <?php the_permalink(); ?> " title = " <?php the_title_attribute(); ?> " >
< ? php the_post_thumbnail ( 'artists-thumb' ); ?>
</ a >
</ div >
2022-09-23 12:32:45 +02:00
< ? php else : ?>
< div class = " contingut curt " >
2022-09-23 19:09:38 +02:00
< 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';?> " />
2022-09-23 12:32:45 +02:00
</ div >
2022-09-12 10:49:39 +02:00
< ? php endif ; ?>
2022-07-19 00:27:21 +02:00
2022-09-23 12:32:45 +02:00
< div class = " boxpeu " >
2022-09-23 19:25:58 +02:00
< ? php // la fletxeta link al post/pàgina ?>
2022-09-27 15:10:30 +02:00
< a href = " <?php the_permalink(); ?> " class = " peubox read-more " 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 >
2022-07-19 00:27:21 +02:00
2022-09-23 12:32:45 +02:00
< ? php if ( is_home ()) : ?>
2022-09-23 19:25:58 +02:00
< ? php // els quadrets link a la categoria pare ?>
2022-09-23 12:32:45 +02:00
< 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 >
</ article >
< ? php elseif (( ! $category ) and ( $tipus == 'equip' )) :
$lang = qtrans_getLanguage ();
if ( $lang == 'ca' ) : $carrec = get_post_meta ( $post -> ID , 'carrec' , true );
elseif ( $lang == 'es' ) : $carrec = get_post_meta ( $post -> ID , 'carrecES' , true );
elseif ( $lang == 'en' ) : $carrec = get_post_meta ( $post -> ID , 'carrecEN' , true );
endif ;
$email = get_post_meta ( $post -> ID , 'email' , true );
$telefon = get_post_meta ( $post -> ID , 'telefon' , true );
?>
2022-11-03 17:01:39 +01:00
<!-- EQUIP i MATRONAT -->
2022-09-23 19:09:38 +02:00
< article class = " not-category tipus-eqip tipus-matronat " >
< 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 ; //echo qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($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 ()) : ?>
2022-09-23 19:25:58 +02:00
< p class = " excerptbox " >< ? php the_excerpt (); ?> </p>
2022-09-23 19:09:38 +02:00
< ? php else : ?>
< div class = " contingut curt " >< ? php echo hangar_trim_excerpt (); ?> </div>
< ? php endif ; ?>
</ article >
< ? php elseif (( ! $category ) and ( $tipus == 'desc' )) : ?>
2022-11-03 17:01:39 +01:00
<!-- els descarregables -->
2022-09-23 19:09:38 +02:00
< article class = " not-category tipus-descarregables 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>
2022-07-19 00:27:21 +02:00
< ? php else : ?>
2022-09-23 19:09:38 +02:00
< 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 >
< div class = " contingut llarg " >
< ? php the_content (); ?>
</ div >
<!-- la fletxeta link al post / pàgina -->
< div class = " boxpeu " >
2022-09-27 15:10:30 +02:00
< a href = " <?php the_permalink(); ?> " class = " peubox read-more " 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 >
2022-09-23 19:09:38 +02:00
<!-- els quadrets link a la categoria pare -->
< ? php if ( is_home ()) : ?>
< 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 ?>
2022-07-19 00:27:21 +02:00
< ? php endif ; ?>
2022-09-23 19:09:38 +02:00
</ div >
2022-07-19 00:27:21 +02:00
2022-09-23 19:09:38 +02:00
</ article >
2022-07-19 00:27:21 +02:00
2022-09-23 19:09:38 +02:00
< ? php else :
// echo " category " . $category . " catt2 " . $catt2 . " category 0 " . $category[0]->term_id;?>
2022-11-03 17:01:39 +01:00
<!-- resta de categories -->
2022-09-23 19:09:38 +02:00
< article class = " category " >
2022-09-23 12:32:45 +02:00
2022-09-23 19:09:38 +02:00
< 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 : ?>
< ? php //echo get_permalink(); ?>
< 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 >
2022-09-23 12:32:45 +02:00
2022-09-23 19:09:38 +02:00
< ? php
$lang = qtrans_getLanguage ();
if ( $lang == 'ca' and ( get_post_meta ( $post -> ID , 'data_activitat' , true ) )) :
?>
< p class = " meta box " >
2022-09-23 12:32:45 +02:00
< ? php
2022-09-23 19:09:38 +02:00
echo get_post_meta ( $post -> ID , 'data_activitat' , true );
if ( get_post_meta ( $post -> ID , 'horari_activitat' , true )) echo " / " . get_post_meta ( $post -> ID , 'horari_activitat' , true );
if ( get_post_meta ( $post -> ID , 'lloc_activitat' , true )) echo " - " . get_post_meta ( $post -> ID , 'lloc_activitat' , true );
?>
</ p >
< ? php
elseif ( $lang == 'es' and ( get_post_meta ( $post -> ID , 'data_activitatES' , true ) )) :
2022-07-19 00:27:21 +02:00
?>
< p class = " meta box " >
< ? php
2022-09-23 19:09:38 +02:00
echo get_post_meta ( $post -> ID , 'data_activitatES' , true );
2022-07-19 00:27:21 +02:00
if ( get_post_meta ( $post -> ID , 'horari_activitat' , true )) echo " / " . get_post_meta ( $post -> ID , 'horari_activitat' , true );
if ( get_post_meta ( $post -> ID , 'lloc_activitat' , true )) echo " - " . get_post_meta ( $post -> ID , 'lloc_activitat' , true );
?>
</ p >
< ? php
2022-09-23 19:09:38 +02:00
elseif ( $lang == 'en' and ( get_post_meta ( $post -> ID , 'data_activitatEN' , true ) )) :
2022-07-19 00:27:21 +02:00
?>
< p class = " meta box " >
< ? php
2022-09-23 19:09:38 +02:00
echo get_post_meta ( $post -> ID , 'data_activitatEN' , true );
2022-07-19 00:27:21 +02:00
if ( get_post_meta ( $post -> ID , 'horari_activitat' , true )) echo " / " . get_post_meta ( $post -> ID , 'horari_activitat' , true );
if ( get_post_meta ( $post -> ID , 'lloc_activitat' , true )) echo " - " . get_post_meta ( $post -> ID , 'lloc_activitat' , true );
?>
</ p >
2022-09-23 19:09:38 +02:00
< ? php else : ?>
2022-07-19 00:27:21 +02:00
< p class = " meta box novista " >< ? php // echo __('Publicat el ','hangar') . the_time('d F Y') ?></p>
< ? php endif ; ?>
< ? php if ( has_post_thumbnail () ) : ?>
2022-09-23 12:32:45 +02:00
< div class = " contingut " >
< a href = " <?php the_permalink(); ?> " title = " <?php the_title_attribute(); ?> " >
< ? php the_post_thumbnail ( 'thumbnail' ); ?>
</ a >
</ div >
2022-07-19 00:27:21 +02:00
< ? php endif ; ?>
2022-09-23 12:32:45 +02:00
< ? php if ( has_excerpt ()) : ?>
< div class = " contingut " >
< p class = " excerptbox " >
< ? php
2022-09-23 19:09:38 +02:00
// https://developer.wordpress.org/reference/functions/wp_trim_words/
echo wp_trim_words ( get_the_excerpt (), 60 , ' <a href="' . get_permalink ( $post -> ID ) . '">[...]</a>' )
?>
</ p >
</ div >
2022-07-19 00:27:21 +02:00
< ? php else : ?>
2022-09-19 15:19:59 +02:00
< div class = " contingut curt " >
2022-09-23 19:09:38 +02:00
< ? php echo hangar_trim_excerpt (); ?>
2022-09-19 15:19:59 +02:00
</ div >
2022-07-19 00:27:21 +02:00
< ? php endif ; ?>
< div class = " boxpeu " >
2022-09-27 15:10:30 +02:00
< a href = " <?php the_permalink(); ?> " class = " peubox read-more " 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 >
2022-07-19 00:27:21 +02:00
< ? 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 ; ?>
2022-09-23 19:09:38 +02:00
</ article >
2022-11-03 17:05:23 +01:00
</ li >