Compare commits
2 Commits
e29b55fb61
...
1a2d2708ef
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a2d2708ef | ||
|
|
e1eb9b428c |
|
|
@ -3,8 +3,7 @@ $align = isset($attributes['align']) ? $attributes['align'] : '';
|
|||
$link = isset($attributes['link']) ? $attributes['link'] : [];
|
||||
$text = isset($attributes['text']) ? $attributes['text'] : '';
|
||||
$color = isset($attributes['color']) ? $attributes['color'] : '';
|
||||
$target = isset($link) && $link['opensInNewTab'] ? '_blank' : '_self';
|
||||
|
||||
$target = (isset($link['opensInNewTab']) && $link['opensInNewTab']) ? '_blank' : '_self';
|
||||
$raw_url = isset($link['url']) ? $link['url'] : '';
|
||||
$is_inner_page_link = is_string($raw_url) && strpos($raw_url, '#') === 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -37,24 +37,18 @@ $post_count = $query->found_posts;
|
|||
<?php if ($query->have_posts()) : ?>
|
||||
<div class="dbmob-grid">
|
||||
<?php while ($query->have_posts()) : $query->the_post(); ?>
|
||||
<?php $maitron_url = get_field('maitron_url', get_the_ID()); ?>
|
||||
|
||||
<?php get_template_part('template-parts/components/cards/post-card', null, array(
|
||||
'ID' => get_the_ID(),
|
||||
'ID' => get_the_ID(),
|
||||
'current_post_type' => 'dbmob',
|
||||
'has_external_link' => isset($maitron_url) && !empty($maitron_url),
|
||||
'external_link' => $maitron_url,
|
||||
'external_link_text' => 'Voir la notice',
|
||||
)); ?>
|
||||
<?php endwhile; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
<?php wp_reset_postdata(); ?>
|
||||
</div>
|
||||
<?php wp_reset_postdata(); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($post_count > $initialPostDisplayAmount) : ?>
|
||||
<button class="load-more-button" data-offset="0" data-posts-per-page="-1">Afficher plus</button>
|
||||
<?php endif; ?>
|
||||
<?php if ($post_count > $initialPostDisplayAmount) : ?>
|
||||
<button class="load-more-button" data-offset="0" data-posts-per-page="-1">Afficher plus</button>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,7 @@ $align = isset($attributes['align']) ? $attributes['align'] : '';
|
|||
$link = isset($attributes['link']) ? $attributes['link'] : [];
|
||||
$text = isset($attributes['text']) ? $attributes['text'] : '';
|
||||
$color = isset($attributes['color']) ? $attributes['color'] : '';
|
||||
$target = isset($link) && $link['opensInNewTab'] ? '_blank' : '_self';
|
||||
|
||||
$target = (isset($link['opensInNewTab']) && $link['opensInNewTab']) ? '_blank' : '_self';
|
||||
$raw_url = isset($link['url']) ? $link['url'] : '';
|
||||
$is_inner_page_link = is_string($raw_url) && strpos($raw_url, '#') === 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -37,24 +37,18 @@ $post_count = $query->found_posts;
|
|||
<?php if ($query->have_posts()) : ?>
|
||||
<div class="dbmob-grid">
|
||||
<?php while ($query->have_posts()) : $query->the_post(); ?>
|
||||
<?php $maitron_url = get_field('maitron_url', get_the_ID()); ?>
|
||||
|
||||
<?php get_template_part('template-parts/components/cards/post-card', null, array(
|
||||
'ID' => get_the_ID(),
|
||||
'ID' => get_the_ID(),
|
||||
'current_post_type' => 'dbmob',
|
||||
'has_external_link' => isset($maitron_url) && !empty($maitron_url),
|
||||
'external_link' => $maitron_url,
|
||||
'external_link_text' => 'Voir la notice',
|
||||
)); ?>
|
||||
<?php endwhile; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
<?php wp_reset_postdata(); ?>
|
||||
</div>
|
||||
<?php wp_reset_postdata(); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($post_count > $initialPostDisplayAmount) : ?>
|
||||
<button class="load-more-button" data-offset="0" data-posts-per-page="-1">Afficher plus</button>
|
||||
<?php endif; ?>
|
||||
<?php if ($post_count > $initialPostDisplayAmount) : ?>
|
||||
<button class="load-more-button" data-offset="0" data-posts-per-page="-1">Afficher plus</button>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user