Commit a0c877b5 authored by agnez's avatar agnez

tests page 87 and 3producers ... to be continued

parent b370656d
<section id="3producteurs" class="uk-block largeur1">
<div class="largeur2">
<div class="uk-text-center"><?php
$producteurs_nourrissent = new WP_Query( array( 'post_type' => 'contentpiece','p' => 204) ); //FIX db entry
while($producteurs_nourrissent->have_posts()) : $producteurs_nourrissent->the_post(); ?>
......@@ -12,7 +13,6 @@
<?php //deux producteurs
$do_not_duplicate = array();
$active_prod = get_query_var( 'choix_prod' );
$href = get_page_link(). '#presentation_producteur';
$short_producteurs = new WP_Query( array(
'post_type' => 'producer',
......@@ -25,10 +25,10 @@
while ( $short_producteurs->have_posts() ) : $short_producteurs->the_post(); ?>
<div class="uk-width-1 uk-width-medium-1-2"><?php
if ( has_post_thumbnail() ) { the_post_thumbnail(); } ?>
if ( has_post_thumbnail() ) { the_post_thumbnail('medium2'); } ?>
<h2><?php echo get_the_title(); ?></h2>
<?php echo get_the_term_list( get_the_ID(), 'producertype', '<div>', ', ', '</div>' ); ?>
<a class="uk-button uk-button-success" href="<?php echo esc_url( add_query_arg( 'choix_prod', get_the_ID(), $href ) )?>" data-uk-smooth-scroll><?php esc_html_e( 'Discover', 'beans_gasap' ); ?></a>
<a class="uk-button uk-button-success" href="<?php echo esc_url( add_query_arg( 'choix_prod', get_the_ID(), '#presentation_producteur' ) ) ?>" data-uk-smooth-scroll><?php esc_html_e( 'Discover', 'beans_gasap' ); ?></a>
<?php edit_post_link( esc_html__( 'Edit producer', 'beans_gasap' ), '<span class="edit-link">', '</span>' ); ?>
</div>
<?php $do_not_duplicate[] = get_the_ID();
......@@ -61,6 +61,7 @@
</div>
</div><?php
endwhile;
wp_reset_postdata();?>
wp_reset_postdata();?>
</div>
</section><?php
wp_reset_postdata();
\ No newline at end of file
......@@ -15,6 +15,7 @@ require_once( get_template_directory() . '/lib/init.php' );
add_theme_support( 'post-thumbnails' );
add_image_size( 'diaporama', 1200, 370, true );
add_image_size( 'newsthumb', 230, 210, true );
add_image_size( 'medium2', 500, 500, true );
}
......@@ -94,4 +95,25 @@ function wp_get_attachment( $attachment_id ) {
'src' => $attachment->guid,
'title' => $attachment->post_title
);
}
// Register custom widget area.
add_action( 'widgets_init', 'example_widget_areas' );
function example_widget_areas() {
beans_register_widget_area( array(
'name' => __( 'Example Widget Area', 'beans_gasap' ),
'id' => 'example_widget_area',
) );
}
// Append custom HTML to the Primary Sidebar.
add_action( 'beans_sidebar_primary_append_markup', 'example_widget_area_custom_html' );
function example_widget_area_custom_html() {
?><div class="uk-panel">ggggggggggggggggggggggggggg</div><?php
}
// Append custom widget area to the Primary Sidebar.
add_action( 'beans_sidebar_primary_append_markup', 'example_custom_widget_area' );
function example_custom_widget_area() {
echo beans_widget_area( 'example_widget_area' );
}
\ No newline at end of file
......@@ -37,6 +37,13 @@ function page_contact_before() {
</div>
</div></article>
TEST
<?php if ( dynamic_sidebar('sidebar_primary') ) : else : endif; ?>
<?php if ( dynamic_sidebar('example_widget_area') ) : else : endif; ?>
<?php echo todays_events(); ?>
<?php echo upcoming_events(); ?>
TEST
<article id="snippet_contact_prod">
<div class="uk-text-center"><?php
$contact_producteurs = new WP_Query( array( 'post_type' => 'contentpiece','p' => 692) ); //FIX db entry
......
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