<?php
/**
 * Template part for displaying page content in page.php
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package aaa
 */

?>

<?php aaa_post_thumbnail(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
	<header class="entry-header">

		
<?php 
		
// _______________LES PAGES CHAPELLES ___________
 		
		if ( 38 == $post->post_parent ) {	

?>
			<div id="chapelle-picto">
			   <img alt="" src="<?php echo get_stylesheet_directory_uri(); ?>/design/<?php the_field( 'picto_chapelle' ); ?>.svg" alt="TITRE DU SITE" onerror="this.removeAttribute('onerror'); this.src='<?php echo get_stylesheet_directory_uri(); ?>/design/<?php the_field( 'picto_chapelle' ); ?>.png'"/>
		    </div>	<!-- #chapelle-picto -->
		    
			
		<div id="chapelle-bloc-titre">
                <?php the_title( '<h1 class="entry-title">', '</h1>' );	?>				    
		        <h2 id="chapelle-commune">
                <?php the_field( 'commune' ); ?>				
		        </h2>
				<a id="ensavoirplus" href="#details-chapelle">En savoir +</a>
			</div> <!-- #bloc-titre -->
		    <div id="chapelle-resume">
             <?php the_field( 'resume' ); ?>					
		    </div>
		<hr class="filet-pleine-largeur" style="clear:both;">
		
  	
			

<?php 				
			
// _______________LES AUTRES PAGES  ___________
	
			
		} else {	
		the_title( '<h1 class="entry-title">', '</h1>' );
		}
		
		?>
		
	</header><!-- .entry-header -->

	<div class="entry-content">
		<?php
		the_content();
		?>
	</div><!-- .entry-content -->

	<?php if ( get_edit_post_link() ) : ?>
		<footer class="entry-footer">
			<?php
			edit_post_link(
				sprintf(
					wp_kses(
						/* translators: %s: Name of current post. Only visible to screen readers */
						__( 'Edit <span class="screen-reader-text">%s</span>', 'aaa' ),
						array(
							'span' => array(
								'class' => array(),
							),
						)
					),
					wp_kses_post( get_the_title() )
				),
				'<span class="edit-link">',
				'</span>'
			);
			?>
		</footer><!-- .entry-footer -->
	<?php endif; ?>
</article><!-- #post-<?php the_ID(); ?> -->
