page-12.php 6.13 KB
Newer Older
agnez's avatar
agnez committed
1 2 3 4 5 6 7 8 9 10 11 12 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 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
 
<?php
/**
 * page Les mangeurs
 *
 */
beans_add_attribute( 'beans_post_content', 'class', 'uk-column-medium-1-2' );

add_action( 'beans_post_before_markup', 'page_les_mangeurs_before' );
function page_les_mangeurs_before() { ?>
	<div id="snippet_p12">
	<?php 
}
add_action( 'beans_post_prepend_markup', 'page_les_mangeurs_in_start' );
function page_les_mangeurs_in_start() { ?>
	<div class="largeur2"> <?php 
}
add_action( 'beans_post_body_append_markup', 'page_les_mangeurs_in_after_body' );
function page_les_mangeurs_in_after_body() {
		$argspourquoi = array(
			'post_type' => 'contentpiece', 
			'orderby'=> 'title', 
			'order' => 'DESC',
			'tax_query' => array(
				array(
					'taxonomy' => 'contentpiecetype',
					'field'    => 'term_id',
					'terms'    => 20 //FIX db entry
				)
			)
		); 
		$pourquoi = new WP_Query( $argspourquoi );
		 ?><div class="uk-grid"> <?php
			while ( $pourquoi->have_posts() ) : $pourquoi->the_post();
				?><div class="uk-width-1 uk-width-small-1-2">
					<div><?php the_content(); ?></div>
					<?php edit_post_link( esc_html__( 'Edit snippet', 'beans_gasap' ), '<span class="edit-link">', '</span>' );?>
				</div><?php
			 endwhile;
			 wp_reset_postdata();?>
		</div><?php
}
add_action( 'beans_post_append_markup', 'page_les_mangeurs_in_end' );
function page_les_mangeurs_in_end() { ?>
	</div> <?php 
}


add_action( 'beans_post_after_markup', 'add_contentpieces_after_les_mangeurs' );
function add_contentpieces_after_les_mangeurs() { ?>
	</div>
	<article id="snippet_mangeurs_comment">
		<div class="largeur3"><?php
		$args_comment_images = array(
			'post_type' => 'attachment',
			'post_mime_type' => 'image',
			'orderby'=> 'date',
			'order' => 'ASC',
			'post_status'    => 'inherit',
			'tax_query' => array(
				array(
					'taxonomy' => 'media_usage',
					'field'    => 'term_id',
					'terms'    => 13 //FIX db entry
				)
			)
		);
		$comment = new WP_Query( array( 'post_type' => 'contentpiece','p' => 65) ); //FIX db entry
		$comment_images = new WP_Query( $args_comment_images ); 
		while($comment->have_posts()) : $comment->the_post(); ?>
agnez's avatar
agnez committed
71
			<div class="uk-panel uk-panel-box uk-panel-box-secondary gasap-panel-box uk-panel-header">
agnez's avatar
agnez committed
72 73 74 75 76 77 78 79 80 81
				<h2 class="uk-panel-title"><?php the_title(); ?></h2>
				<div class="textegauche"><?php the_content(); ?></div>
				<?php edit_post_link( esc_html__( 'Edit snippet', 'beans_gasap' ), '<p class="edit-link">', '</p>' ); ?>				
				<div class="uk-grid"><?php
					while ( $comment_images->have_posts() ) : $comment_images->the_post();
						$image = wp_get_attachment_image_src( get_the_ID() );?>
						<div class="uk-width-1 uk-width-medium-1-3">
							<img src="<?php echo $image[0];?>" />
							<div><?php the_title(); ?></div>
						</div>
agnez's avatar
agnez committed
82 83
					<?php endwhile;
					wp_reset_postdata();?>
agnez's avatar
agnez committed
84 85
				</div>				
			</div>
agnez's avatar
agnez committed
86 87
		<?php endwhile; 
		wp_reset_postdata();?>
agnez's avatar
agnez committed
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
		</div>
	</article> 

	<article id="snippet_mange_chouette"><div class="largeur2">
	<?php
		$argsmangechouette = array(
			'post_type' => 'contentpiece', 
			'orderby'=> 'date', 
			'order' => 'ASC',
			'tax_query' => array(
				array(
					'taxonomy' => 'contentpiecetype',
					'field'    => 'term_id',
					'terms'    => 14 //FIX db entry
				)
			)
		); 
		$mangechouette = new WP_Query( $argsmangechouette );
		 ?><div class="uk-grid"> <?php
			while ( $mangechouette->have_posts() ) : $mangechouette->the_post();
				?><div class="uk-width-1 uk-width-medium-1-2">
					<?php if ( has_post_thumbnail() ) { the_post_thumbnail('thumbnail'); } ?>
agnez's avatar
agnez committed
110 111
					<h2><?php the_title(); ?></h2>
					<div class="content"><?php the_content(); ?></div>
agnez's avatar
agnez committed
112 113
					<?php edit_post_link( esc_html__( 'Edit snippet', 'beans_gasap' ), '<span class="edit-link">', '</span>' );?>
				</div><?php
agnez's avatar
agnez committed
114 115
			 endwhile;
			 wp_reset_postdata();?>
agnez's avatar
agnez committed
116 117 118 119
		</div>			
	</div></article>

	<article id="snippet_avantages"><div class="largeur2">
agnez's avatar
agnez committed
120
		<h2 class="h1"><?php esc_html_e( 'Les avantages', 'beans_gasap' ); ?></h2>
agnez's avatar
agnez committed
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
	<?php
		$argsavantages = array(
			'post_type' => 'contentpiece', 
			'orderby'=> 'date', 
			'order' => 'ASC',
			'tax_query' => array(
				array(
					'taxonomy' => 'contentpiecetype',
					'field'    => 'term_id',
					'terms'    => 11 //FIX db entry
				)
			)
		); 
		$avantages = new WP_Query( $argsavantages ); 
			?> <div class="uk-grid"> <?php
			while ( $avantages->have_posts() ) : $avantages->the_post();?>
				<div class="uk-width-1 uk-width-medium-1-2">
agnez's avatar
agnez committed
138
						<h3 class="plus"><?php the_title(); ?></h3><?php
agnez's avatar
agnez committed
139 140 141
						the_content();
						edit_post_link( esc_html__( 'Edit snippet', 'beans_gasap' ), '<span class="edit-link">', '</span>' );?>
				</div><?php
agnez's avatar
agnez committed
142 143
			endwhile;
			wp_reset_postdata();?>
agnez's avatar
agnez committed
144 145 146 147
		</div>			
	</div></article>

	<article id="snippet_les_engagements">
agnez's avatar
agnez committed
148
		<h2 class="h1"><?php esc_html_e( 'Les engagements', 'beans_gasap' ); // Les engagements ?></h2>
agnez's avatar
agnez committed
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166
		<div class="uk-grid">	
		<?php 
		$argsengagements = array(
			'post_type' => 'contentpiece', 
			'orderby'=> 'date', 
			'order' => 'ASC',
			'tax_query' => array(
				array(
					'taxonomy' => 'contentpiecetype',
					'field'    => 'term_id',
					'terms'    => 15 //FIX db entry
				)
			)
		); 
		$engagements = new WP_Query( $argsengagements );
		while($engagements->have_posts()) : $engagements->the_post(); ?>
			<div class="uk-width-1 uk-width-medium-1-2 uk-width-large-1-4">
				<?php the_post_thumbnail('thumbnail'); ?>
agnez's avatar
agnez committed
167
				<h3 class="plus"><?php the_title(); ?></h3>
agnez's avatar
agnez committed
168 169 170
				<?php the_content(); ?>
				<?php edit_post_link( esc_html__( 'Edit snippet', 'beans_gasap' ), '<span class="edit-link">', '</span>' ); ?>
			</div>
agnez's avatar
agnez committed
171 172
		<?php endwhile; 
		wp_reset_postdata();?>
agnez's avatar
agnez committed
173 174 175 176 177
		</div>		
	</article>

	<?php
	include (get_stylesheet_directory() . '/assets/template_parts/three_steps.php');// Comment devenir membre en 3 étapes ?
agnez's avatar
agnez committed
178
	include (get_stylesheet_directory() . '/assets/template_parts/map_gasap.php'); 
agnez's avatar
agnez committed
179
	//include (get_stylesheet_directory() . '/assets/template_parts/three_producers.php');
agnez's avatar
agnez committed
180
	include (get_stylesheet_directory() . '/assets/template_parts/news_slider.php');	
agnez's avatar
agnez committed
181 182 183 184 185 186
	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();