Commit a1b8e3e4 authored by agnez's avatar agnez

carte tabs gasap-producteurs

parent 8a359bc7
<section id="snippet_la_carte">
<div class="uk-grid">
<div class="uk-width-1-1 uk-width-medium-2-3">
<h2>Trouvez un GASAP près de chez vous !</h2><?php
$gasap = new WP_Query( array(
'post_type' => 'gasap',
'order_by' => 'title'
)); ?>
<div class="uk-grid"><?php
if($gasap->have_posts()){
while ( $gasap->have_posts() ) : $gasap->the_post();
global $post; ?>
<div class="uk-width-1-1 uk-width-medium-1-2">
<div class="uk-panel uk-panel-box">
<h3 class="uk-panel-title"><?php echo get_the_title(); ?></h3>
<?php the_content() ?>
<!-- Contact form popup -->
<button class="uk-button" data-uk-modal="{target:'#contac-gasap-form'}">Contacter ce GASAP</button>
<div id="contac-gasap-form" class="uk-modal">
<div class="uk-modal-dialog">
<a class="uk-modal-close uk-close"></a>
<?php echo do_shortcode( '[contact-form-7 id="147" title="Contact form 1"]' ); ?>
</div>
</div>
<div><?php edit_post_link( esc_html__( 'Edit gasap', 'beans_gasap' ), '<span class="edit-link">', '</span>' ); ?></div>
<div class="uk-width-1-1 uk-width-medium-2-3"><!-- left side -->
<ul class="uk-tab" data-uk-tab="{connect:'#tab-content'}">
<li><a href="#"><h2><?php esc_html_e( 'Trouvez un GASAP près de chez vous !', 'beans_gasap' ) ?></h2></a></li>
<li><a href="#"><h2><?php esc_html_e( 'Trouvez un producteur', 'beans_gasap' ) ?></h2></a></li>
</ul>
<div id="tab-content" class="uk-switcher uk-margin">
<div>
<div class="largeur3">
<h6><?php esc_html_e( 'Mieux comprendre', 'beans_gasap' ) ?></h6>
<?php
$argsmieux_comprendre = array(
'post_type' => 'contentpiece',
'orderby'=> 'date',
'order' => 'ASC',
'tax_query' => array(
array(
'taxonomy' => 'contentpiecetype',
'field' => 'term_id',
'terms' => 41 //FIX
)
)
);
$mieux_comprendre = new WP_Query( $argsmieux_comprendre );
?><div class="uk-grid uk-grid-match"> <?php
while ( $mieux_comprendre->have_posts() ) : $mieux_comprendre->the_post();
?><div class="uk-width-1 uk-width-medium-1-2">
<h4><?php the_title(); ?></h4>
<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>
</div><?php
endwhile;
wp_reset_postdata();
}?>
</div>
</div>
</div><?php
$gasap = new WP_Query( array(
'post_type' => 'gasap',
'order_by' => 'title'
)); ?>
<div class="uk-grid"><?php
if($gasap->have_posts()){
while ( $gasap->have_posts() ) : $gasap->the_post();
global $post; ?>
<div class="uk-width-1-1 uk-width-medium-1-2">
<div class="uk-panel uk-panel-box">
<h3 class="uk-panel-title"><?php echo get_the_title(); ?></h3>
<?php the_content() ?>
<!-- Contact form popup -->
<button class="uk-button" data-uk-modal="{target:'#contac-gasap-form'}">Contacter ce GASAP</button>
<div id="contac-gasap-form" class="uk-modal">
<div class="uk-modal-dialog">
<a class="uk-modal-close uk-close"></a>
<?php echo do_shortcode( '[contact-form-7 id="147" title="Contact form 1"]' ); ?>
</div>
</div>
<div><?php edit_post_link( esc_html__( 'Edit gasap', 'beans_gasap' ), '<span class="edit-link">', '</span>' ); ?></div>
</div>
</div><?php
endwhile;
wp_reset_postdata();
}?>
</div>
</div>
<div>content producteurs</div>
</div><!-- #tab-content -->
</div><!-- end left side -->
<div class="uk-width-1-1 uk-width-medium-1-3">
<?php echo do_shortcode('[gmw_post_info]'); ?>
</div>
......
......@@ -17,7 +17,7 @@ function gasap_enqueue_uikit_assets() {
// Enqueue uikit overwrite theme folder
//beans_uikit_enqueue_theme( 'beans_gasap', get_stylesheet_directory_uri() . '/assets/less/uikit' );
// Add the theme style as a uikit fragment to have access to all the variables
beans_uikit_enqueue_components( array( 'switcher', 'modal' ) );
beans_uikit_enqueue_components( array( 'switcher', 'modal', 'tab' ) );
beans_uikit_enqueue_components( array( 'slider', 'slideshow' ), 'add-ons' );
beans_compiler_add_fragment( 'uikit', get_stylesheet_directory_uri() . '/assets/less/style.less', 'less' );
beans_compiler_add_fragment( 'uikit', get_stylesheet_directory_uri() . '/assets/less/gasap.less', 'less' );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment