Style Add default cover
This commit is contained in:
parent
1178028bfb
commit
8e3a12f62a
Binary file not shown.
|
After Width: | Height: | Size: 93 KiB |
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
$postID = $args['post_ID'];
|
||||
$post_thumbnail = get_the_post_thumbnail($postID, 'full', array('class' => 'card-artisans__thumbnail card-post__thumbnail')) ?? null;
|
||||
$postDefautlThumbnail = get_stylesheet_directory_uri() . '/resources/img/photos/default-cover.jpg';
|
||||
$postDefautlThumbnail = get_stylesheet_directory_uri() . '/resources/img/illustrations/Homegrade-metier-du-patrimoine-artisan-vignette.jpg';
|
||||
|
||||
$post_title = $args['post_title'];
|
||||
$post_permalink = get_the_permalink($postID);
|
||||
|
|
@ -27,6 +27,8 @@ write_log($cover_image);
|
|||
<?php echo $post_thumbnail ?>
|
||||
<?php if ($cover_image): ?>
|
||||
<img src="<?php echo $cover_image['url'] ?>" alt="<?php echo $post_title ?>" class="card-artisans__cover-image">
|
||||
<?php else: ?>
|
||||
<img src="<?php echo $postDefautlThumbnail ?>" alt="<?php echo $post_title ?>" class="card-artisans__cover-image">
|
||||
<?php endif; ?>
|
||||
<div class="card-artisans__inner">
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
$postID = $args['post_ID'];
|
||||
$post_thumbnail = get_the_post_thumbnail($postID, 'full', array('class' => 'card-artisans__thumbnail card-post__thumbnail')) ?? null;
|
||||
$postDefautlThumbnail = get_stylesheet_directory_uri() . '/resources/img/illustrations/Homegrade-metier-du-patrimoine-artisan-vignette.jpg';
|
||||
|
||||
$post_title = $args['post_title'];
|
||||
$company_members = get_field('company_members', $postID);
|
||||
|
|
@ -23,6 +24,8 @@ $cover_image = get_field('artisan_cover', $postID);
|
|||
<?php echo $post_thumbnail ?>
|
||||
<?php if ($cover_image): ?>
|
||||
<img src="<?php echo $cover_image['url'] ?>" alt="<?php echo $post_title ?>" class="card-artisans__cover-image">
|
||||
<?php else: ?>
|
||||
<img src="<?php echo $postDefautlThumbnail ?>" alt="<?php echo $post_title ?>" class="card-artisans__cover-image">
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user