71 lines
2.2 KiB
PHP
71 lines
2.2 KiB
PHP
|
<?php
|
||
|
/**
|
||
|
* Template Name: Detall i index obres
|
||
|
*
|
||
|
* 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="unic mix">
|
||
|
<?php wp_breadcrumb();?>
|
||
|
<div id="pagina" class="shadow">
|
||
|
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
|
||
|
|
||
|
<?php if ( is_front_page() ) { ?>
|
||
|
<h2><?php the_title(); ?></h2>
|
||
|
<?php } else { ?>
|
||
|
<h2><?php the_title(); ?></h2>
|
||
|
<?php } ?>
|
||
|
|
||
|
<p class="resid">Periode de residència:<br/>
|
||
|
<?php echo get_post_meta($post->ID, 'autor_data_resid', true); ?>
|
||
|
</p>
|
||
|
<?php the_content(); ?>
|
||
|
<div class="clear"></div>
|
||
|
<?php wp_link_pages( array( 'before' => '' . __( 'Pages:', 'hangar' ), 'after' => '' ) ); ?>
|
||
|
<?php edit_post_link( __( 'Edit this page →', 'hangar' ), '', '' ); ?>
|
||
|
|
||
|
<?php // comments_template( '', true ); ?>
|
||
|
|
||
|
<?php $pare = get_the_ID(); endwhile; ?>
|
||
|
<!--<div id="navegacio" class="dins">
|
||
|
<p class="previous"><?php previous_post_link( '%link', '' . _x( '← Previous Post', 'Previous post link', 'hangar' ) . '' ); ?></p>
|
||
|
<p class="next"><?php next_post_link( '%link', __('') . _x( 'Next Post →', 'Next post link', 'hangar' ) . '' ); ?></p>
|
||
|
</div> -->
|
||
|
|
||
|
</div>
|
||
|
<!--end Page-->
|
||
|
<!--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++;
|
||
|
$tipus = 'obra';
|
||
|
|
||
|
?>
|
||
|
<?php include(TEMPLATEPATH . "/caixes.php"); ?>
|
||
|
<?php endwhile; wp_reset_query(); ?>
|
||
|
<?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(); ?>
|