Commit e65f937c authored by Ludovic Jolis's avatar Ludovic Jolis
Browse files

End TP5 start TP6

parent 7990af7a
......@@ -6,66 +6,40 @@
<div class="hero_slider_container slider_prlx">
<div class="owl-carousel owl-theme hero_slider">
<!-- Slider Item -->
<div class="owl-item main_slider_item">
<div class="main_slider_item_bg" style="background-image:url(<?= get_stylesheet_directory_uri(); ?>/images/main_slider_1.jpg)"></div>
<div class="main_slider_shapes"><img src="<?= get_stylesheet_directory_uri(); ?>/images/main_slider_shapes.png" alt="" style="width: 100% !important;"></div>
<div class="container">
<div class="row">
<div class="col slider_content_col">
<div class="main_slider_content">
<h1>Harry Potter</h1>
<p>Fantastique</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur leo est, feugiat nec elementum id, suscipit id nulla. </p>
<div class="button discover_button">
<a href="#" class="d-flex flex-row align-items-center justify-content-center">Découvrir<img src="images/arrow_right.svg" alt=""></a>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Slider Item -->
<div class="owl-item main_slider_item">
<div class="main_slider_item_bg" style="background-image:url(<?= get_stylesheet_directory_uri(); ?>/images/main_slider_2.jpg)"></div>
<div class="main_slider_shapes"><img src="<?= get_stylesheet_directory_uri(); ?>/images/main_slider_shapes.png" alt="" style="width: 100% !important;"></div>
<div class="container">
<div class="row">
<div class="col slider_content_col">
<div class="main_slider_content">
<h1>Le Labyrinthe</h1>
<p>Science Fiction</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur leo est, feugiat nec elementum id, suscipit id nulla. </p>
<div class="button discover_button">
<a href="#" class="d-flex flex-row align-items-center justify-content-center">Découvrir<img src="images/arrow_right.svg" alt=""></a>
<?php
$args = array( 'post_type' => 'supports');
$the_query = new WP_Query( $args );
// The Loop
if ( $the_query->have_posts() ) {
while ( $the_query->have_posts() ) {
$the_query->the_post();
?>
<!-- Slider Item -->
<div class="owl-item main_slider_item">
<div class="main_slider_item_bg" style="background-image:url(<?= the_post_thumbnail_url() ?>)"></div>
<div class="main_slider_shapes"><img src="<?= get_stylesheet_directory_uri(); ?>/images/main_slider_shapes.png" alt="" style="width: 100% !important;"></div>
<div class="container">
<div class="row">
<div class="col slider_content_col">
<div class="main_slider_content">
<h1><?= the_title()?></h1>
<p><?=the_taxonomies() ?></p>
<p><?= the_excerpt() ?></p>
<div class="button discover_button">
<a href="#" class="d-flex flex-row align-items-center justify-content-center">Découvrir<img src="images/arrow_right.svg" alt=""></a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
}
}
/* Restore original Post Data */
wp_reset_postdata();
?>
<!-- Slider Item -->
<div class="owl-item main_slider_item">
<div class="main_slider_item_bg" style="background-image:url(<?= get_stylesheet_directory_uri(); ?>/images/main_slider_3.jpg)"></div>
<div class="main_slider_shapes"><img src="<?= get_stylesheet_directory_uri(); ?>/images/main_slider_shapes.png" alt="" style="width: 100% !important;"></div>
<div class="container">
<div class="row">
<div class="col slider_content_col">
<div class="main_slider_content">
<h1>Eragon</h1>
<p>Fantasy</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur leo est, feugiat nec elementum id, suscipit id nulla. </p>
<div class="button discover_button">
<a href="#" class="d-flex flex-row align-items-center justify-content-center">Découvrir<img src="images/arrow_right.svg" alt=""></a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Slider Dots -->
......@@ -189,38 +163,41 @@
<div class="owl-carousel owl-theme testimonials_slider">
<!-- Testimonials Item -->
<div class="owl-item testimonials_item d-flex flex-column align-items-center justify-content-center text-center">
<div class="testimonials_content">
<div class="test_user_pic"><img src="<?= get_stylesheet_directory_uri(); ?>/images/test_user.jpg" alt="https://unsplash.com/@michaeldam"></div>
<div class="test_name">maria williams</div>
<div class="test_title">Company CEO</div>
<div class="test_quote">"</div>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus vestibulum, olor sit amet, consectetur adipiscing eli quam tincidunt venen atis ultrices, est libero olor sit amet, consectetur adipiscing eli mattis ante.</p>
</div>
</div>
<!-- Testimonials Item -->
<div class="owl-item testimonials_item d-flex flex-column align-items-center justify-content-center text-center">
<div class="testimonials_content">
<div class="test_user_pic"><img src="<?= get_stylesheet_directory_uri(); ?>/images/test_user.jpg" alt="https://unsplash.com/@michaeldam"></div>
<div class="test_name">maria williams</div>
<div class="test_title">Company CEO</div>
<div class="test_quote">"</div>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus vestibulum, olor sit amet, consectetur adipiscing eli quam tincidunt venen atis ultrices, est libero olor sit amet, consectetur adipiscing eli mattis ante.</p>
</div>
</div>
<?php
$posttype = array( 'post_type' => 'témoignages');
$args = array(
'orderby' => 'post_title',
'order' => 'ASC'
);
$the_query = new WP_Query( $posttype, $args );
// The Loop
if ( $the_query->have_posts() ) {
while ( $the_query->have_posts() ) {
$the_query->the_post();
$image = get_field('photo');
?>
<!-- Testimonials Item -->
<div class="owl-item testimonials_item d-flex flex-column align-items-center justify-content-center text-center">
<div class="testimonials_content">
<div class="test_user_pic">
<?php if( !empty( $image ) ): ?>
<img src="<?= esc_url($image['sizes']['temoignage']); ?>" alt="<?php echo esc_attr($image['alt']); ?>"></div>
<?php endif; ?>
<div class="test_name"><?=the_title() ?></div>
<div class="test_title"><?= the_field('fonction') ?></div>
<div class="test_quote">"</div>
<p><?= the_field('temoignage') ?></p>
</div>
</div>
<?php
}
}
/* Restore original Post Data */
wp_reset_postdata();
?>
<!-- Testimonials Item -->
<div class="owl-item testimonials_item d-flex flex-column align-items-center justify-content-center text-center">
<div class="testimonials_content">
<div class="test_user_pic"><img src="<?= get_stylesheet_directory_uri(); ?>/images/test_user.jpg" alt="https://unsplash.com/@michaeldam"></div>
<div class="test_name">maria williams</div>
<div class="test_title">Company CEO</div>
<div class="test_quote">"</div>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus vestibulum, olor sit amet, consectetur adipiscing eli quam tincidunt venen atis ultrices, est libero olor sit amet, consectetur adipiscing eli mattis ante.</p>
</div>
</div>
</div>
</div>
......
......@@ -40,9 +40,49 @@ if( function_exists('acf_add_options_page') ) {
function create_post_type(){
register_post_type('supports', array(
'title',
'thumbnail',
'editor',
'excerpt',
'labels'=>array(
'name'=> __('Supports'),
'singular_name'=>__('Support'),
),
'supports'=>array(
'title',
'thumbnail',
'editor',
'excerpt'
),
'public'=> true,
));
}
\ No newline at end of file
}
function create_taxonomy() {
register_taxonomy(
'genre',
'supports',
array(
'label' => __( 'Genre' ),
)
);
}
function create_testimony_type(){
register_post_type('témoignages', array(
'labels'=>array(
'name'=> __('Témoignages'),
'singular_name'=>__('Témoignage'),
),
'supports'=>array(
'title',
),
'public'=> true,
));
}
function temoignage_image_size(){
add_image_size( 'temoignage', 94, 94 );
}
add_action('init', 'create_post_type');
add_action('init', 'create_taxonomy');
add_action('init', 'create_testimony_type');
add_action('init', 'temoignage_image_size');
Supports Markdown
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