added conditonals for begin or en date and free text in agenda category showin 3 posts
This commit is contained in:
parent
b54d5de214
commit
10298cd016
|
@ -1,10 +1,13 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Template part for displaying posts from category "agenda"
|
* Template part for displaying 3 posts from category "agenda"
|
||||||
*
|
*
|
||||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||||
*
|
*
|
||||||
* @package Xarxaprod_theme
|
* @package Xarxaprod_theme
|
||||||
|
* @used by page.php
|
||||||
|
* @shown in : home
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -53,8 +56,16 @@
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</section>
|
</section>
|
||||||
<aside class="agenda-date agenda-data">
|
<aside class="agenda-date agenda-data">
|
||||||
<?php if( get_field('xxp_agenda_date_start') ): ?>
|
<?php if( get_field('xxp_agenda_date_start') || get_field('xxp_agenda_date_start') || get_field('xxp_agenda_free_text') ): ?>
|
||||||
<p class="item-xxp-agenda-date-start"><?php the_field('xxp_agenda_date_start'); ?></p>
|
<p>
|
||||||
|
<?php if( get_field('xxp_agenda_date_start') ){ ?>
|
||||||
|
<span class="item-xxp-agenda-date-start">el <?php the_field('xxp_agenda_date_start'); ?></span>
|
||||||
|
<?php } elseif ( get_field('xxp_agenda_date_end') ){ ?>
|
||||||
|
<span class="item-xxp-agenda-date-end">fins al<?php the_field('xxp_agenda_date_start'); ?></span>
|
||||||
|
<?php } elseif ( get_field('xxp_agenda_free_text') ){?>
|
||||||
|
<span class="item-xxp-agenda-free-text"><?php the_field('xxp_agenda_free_text'); ?></span>
|
||||||
|
<?php }; ?>
|
||||||
|
</p>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</aside>
|
</aside>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue