page-2.php 2.59 KB
Newer Older
agnez's avatar
agnez committed
1 2 3 4 5
<?php
/**
 * page Le GASAP
 *
 */
agnez's avatar
agnez committed
6

agnez's avatar
agnez committed
7
//add_action( 'wp_enqueue_scripts', 'scripts_three_producers' );
agnez's avatar
agnez committed
8
function scripts_three_producers() {
agnez's avatar
agnez committed
9

agnez's avatar
agnez committed
10 11 12
}


agnez's avatar
agnez committed
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
add_action( 'beans_post_before_markup', 'page_le_gasap_before' );
function page_le_gasap_before() {
		?>
	<section id="snippet_p2"><div class="largeur2">
	<?php 
}


add_action( 'beans_post_after_markup', 'add_page_le_gasap_content_pieces' );
function add_page_le_gasap_content_pieces() {
	//3 bouton liens sous le texte?>
		<div id="snippet_trois_boutons" class="uk-grid" data-uk-grid-match>
		<?php 
			$argstroisboutons = array(
				'post_type' => 'contentpiece', 
				'orderby'=> 'title', 
				'order' => 'ASC',
				'tax_query' => array(
					array(
						'taxonomy' => 'contentpiecetype',
						'field'    => 'term_id',
						'terms'    => 3 //FIX db entry
					)
				)
			); 
			$troisboutons = new WP_Query( $argstroisboutons );
			while ( $troisboutons->have_posts() ) : $troisboutons->the_post(); ?>
				<div class="uk-width-1-1 uk-width-medium-1-3">
				<?php if ( has_post_thumbnail() ) {
					the_post_thumbnail('full');
				}?> 
					<div><?php the_content(); ?>
					<?php edit_post_link( esc_html__( 'Edit snippet', 'beans_gasap' ), '<span class="edit-link">', '</span>' ); ?>
				</div></div>
agnez's avatar
agnez committed
47 48
			<?php endwhile;
			wp_reset_postdata();?>
agnez's avatar
agnez committed
49 50 51 52 53 54
		</div>
	</div></section>
	<?php


	//la carte
agnez's avatar
agnez committed
55
	//include (get_stylesheet_directory() . '/assets/template_parts/map_gasap.php');
agnez's avatar
agnez committed
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72

	// Le Réseau 
	?>
	<section id="snippet_le_reseau"><div class="largeur2">
		<?php 
		$lereseau = new WP_Query( array( 'post_type' => 'contentpiece','p' => 33) ); 
		while($lereseau->have_posts()) : $lereseau->the_post(); ?>
			<h2><?php the_title(); ?></h2>
			<div class="uk-grid">
				<div class="uk-width-1 uk-width-medium-1-2">
					<?php the_post_thumbnail(); ?>
				</div>
				<div class="uk-width-1 uk-width-medium-1-2">
					<?php the_content(); ?>
					<?php edit_post_link( esc_html__( 'Edit snippet', 'beans_gasap' ), '<span class="edit-link">', '</span>' ); ?>
				</div>
			</div>
agnez's avatar
agnez committed
73 74
		<?php endwhile; 
		wp_reset_postdata();?>
agnez's avatar
agnez committed
75 76 77
	</div></section>
	<?php
	include (get_stylesheet_directory() . '/assets/template_parts/three_steps.php');// Comment devenir membre en 3 étapes ?
agnez's avatar
agnez committed
78
	include (get_stylesheet_directory() . '/assets/template_parts/three_producers.php');
agnez's avatar
agnez committed
79
	include (get_stylesheet_directory() . '/assets/template_parts/news_slider.php');
agnez's avatar
agnez committed
80 81 82 83 84 85
	include (get_stylesheet_directory() . '/assets/template_parts/latest_news.php');
	include (get_stylesheet_directory() . '/assets/template_parts/contact_calendar.php');
	include (get_stylesheet_directory() . '/assets/template_parts/footer.php');
}

beans_load_document();