98 lines
3.3 KiB
PHP
98 lines
3.3 KiB
PHP
|
<?php
|
||
|
/**
|
||
|
* Template Name: Seccions
|
||
|
*
|
||
|
* 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="indexall tocada">
|
||
|
<!-- la primera caixa és la de títol i descripció de la pàgina pare i hi haurà resum del contingut de la pàgina -->
|
||
|
|
||
|
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
|
||
|
|
||
|
<div id="post-<?php the_ID(); ?>" <?php post_class("boxentry nofons"); ?>>
|
||
|
|
||
|
<div class="entry-content">
|
||
|
<h2 class="box index"><?php the_title(); ?></h2>
|
||
|
|
||
|
<?php if ( has_post_thumbnail() ) : // check if the post has a Post Thumbnail assigned to it.
|
||
|
the_post_thumbnail('thumbnail'); ?>
|
||
|
<p class="excerptbox"><?php echo get_the_excerpt(); ?></p>
|
||
|
<?php else : ?>
|
||
|
<div class="contentcurt"><?php echo get_the_content_with_formatting(); ?></div>
|
||
|
<?php endif; ?>
|
||
|
|
||
|
<?php
|
||
|
/* echo '<div class="descseccio">';
|
||
|
global $more;
|
||
|
$more = 0;//The code must be inserted ahead of the call to the content
|
||
|
the_content('Continue Reading');
|
||
|
$more = true;
|
||
|
echo '</div>';*/ ?>
|
||
|
|
||
|
<!--<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 // the_content( sprintf( __( 'Continue reading %1$s', 'hybrid' ), the_title( ' "', '"', false ) ) ); ?>
|
||
|
<?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', 'hangar' ), 'after' => '</p>' ) ); ?>
|
||
|
</div><!-- .entry-content -->
|
||
|
</div><!-- post .hentry -->
|
||
|
|
||
|
<?php $pare = get_the_ID(); endwhile; ?>
|
||
|
|
||
|
<?php else: ?>
|
||
|
|
||
|
<p class="no-data">
|
||
|
<?php _e( 'Apologies, but no results were found.', 'hangar' ); ?>
|
||
|
</p><!-- .no-data -->
|
||
|
|
||
|
<?php endif; ?>
|
||
|
|
||
|
<!--ara els fills-->
|
||
|
<?php
|
||
|
$indexseccions = new WP_Query();
|
||
|
$indexseccions->query('posts_per_page=-1&post_type=page&orderby=menu_order&order=asc&post_parent=' . $pare );
|
||
|
?>
|
||
|
|
||
|
<?php if ($indexseccions->have_posts()) : ?>
|
||
|
<?php echo '<ul>'; $i = 0; while ($indexseccions->have_posts()) : $indexseccions->the_post(); $i++;
|
||
|
if ($pare == 2) : //artistes residents post=2
|
||
|
$tipus = 'art';
|
||
|
elseif ($pare == 46565) : //artistes residents estada curta post=46565
|
||
|
$tipus = 'art';
|
||
|
elseif ($pare == 46572) : //artistes amb beca post=46572
|
||
|
$tipus = 'art';
|
||
|
elseif ($pare == 136) : //desc+arregues post=136
|
||
|
$tipus = 'desc';
|
||
|
elseif ($pare == 74) : //equip post=74
|
||
|
$tipus = 'equip';
|
||
|
elseif ($pare == 40378) : //patronat post=40378
|
||
|
$tipus = 'equip';
|
||
|
else:
|
||
|
$tipus = 'pag';
|
||
|
endif;
|
||
|
?>
|
||
|
|
||
|
<?php include(TEMPLATEPATH . "/caixes.php"); ?>
|
||
|
|
||
|
<?php endwhile; wp_reset_query(); ?>
|
||
|
</ul>
|
||
|
<?php else: ?>
|
||
|
<p class="no-data">
|
||
|
<?php _e( 'Apologies, but no results were found.', 'hangar' ); ?>
|
||
|
</p><!-- .no-data -->
|
||
|
<?php endif; ?>
|
||
|
|
||
|
</div><!-- .content -->
|
||
|
</div>
|
||
|
<!--end Main-->
|
||
|
|
||
|
<?php get_footer(); ?>
|