2021-02-18 14:09:56 +01:00
|
|
|
<?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">
|
2022-07-08 16:30:53 +02:00
|
|
|
<div id="content" class="indexall">
|
2022-09-23 19:09:38 +02:00
|
|
|
<?php // 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 ?>
|
2021-02-18 14:09:56 +01:00
|
|
|
|
|
|
|
<?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'); ?>
|
2022-09-23 19:09:38 +02:00
|
|
|
<p class="excerptbox"><?php the_excerpt(); ?></p>
|
2021-02-18 14:09:56 +01:00
|
|
|
<?php else : ?>
|
2022-09-23 19:09:38 +02:00
|
|
|
<div class="contentcurt">
|
|
|
|
<?php echo hangar_trim_excerpt();?>
|
|
|
|
</div>
|
2021-02-18 14:09:56 +01:00
|
|
|
<?php endif; ?>
|
|
|
|
<?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++;
|
2022-09-12 10:50:06 +02:00
|
|
|
if ($pare == 2 ) : //artistes residents post=2
|
2021-02-18 14:09:56 +01:00
|
|
|
$tipus = 'art';
|
2022-09-12 10:50:06 +02:00
|
|
|
elseif ($pare == 58856) : //artistes residents post=58856 por cambio página el 2022 07 19
|
|
|
|
$tipus = 'art';
|
2021-02-18 14:09:56 +01:00
|
|
|
elseif ($pare == 46565) : //artistes residents estada curta post=46565
|
|
|
|
$tipus = 'art';
|
|
|
|
elseif ($pare == 46572) : //artistes amb beca post=46572
|
|
|
|
$tipus = 'art';
|
2022-11-03 17:09:44 +01:00
|
|
|
elseif ($pare == 58844) : //artistes residencies internacionals post=58844
|
|
|
|
$tipus = 'art';
|
|
|
|
elseif ($pare == 59095) : //proyectos residentes post=59095
|
2022-09-19 14:51:14 +02:00
|
|
|
$tipus = 'art';
|
2021-02-18 14:09:56 +01:00
|
|
|
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: ?>
|
2022-09-12 14:04:17 +02:00
|
|
|
<p class="no-data">
|
|
|
|
<?php // _e( 'Apologies, but no results were found.', 'hangar' ); ?>
|
|
|
|
</p><!-- .no-data -->
|
2021-02-18 14:09:56 +01:00
|
|
|
<?php endif; ?>
|
|
|
|
|
2022-09-12 14:04:17 +02:00
|
|
|
</div><!-- #content .indexall -->
|
|
|
|
|
2021-02-18 14:09:56 +01:00
|
|
|
|
2022-09-12 14:45:38 +02:00
|
|
|
<div id="content" class="indexall extra">
|
|
|
|
<?php
|
|
|
|
// Detect plugin. For use on Front End only.
|
|
|
|
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
|
|
|
// check for plugin using plugin name
|
|
|
|
if ( is_plugin_active( 'hangar-wp-plugin/hangar-wp-plugin.php' ) ) {
|
|
|
|
//plugin is activated do
|
|
|
|
hangar_show_extra_content();
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
|
|
|
</div><!-- end indexall extra -->
|
|
|
|
|
2021-02-18 14:09:56 +01:00
|
|
|
<?php get_footer(); ?>
|