Home › Forums › Add-ons › Repeater Field › Calendar by month with date repeater › Reply To: Calendar by month with date repeater
Hello James
Thank you very mutch for your help. I decided to change method.
I have created one page “calendar” with my repeater and i use relationship for the relation with my event.
my current code is :
<?php
/**
* Template Name: Test Calendrier
*/
?>
<?php get_header(); ?>
<div class="title-page no-thumb">
<?php
if( have_rows('calendrier') ) :
while ( have_rows('calendrier') ) :
the_row();
$date_debut = get_sub_field('jour_debut');
$mois_spectacle = explode(" ", $date_debut)[1];
echo '<h1>'.$mois_spectacle.'</h1>';
?>
<?php
$posts = get_sub_field('spectacle');
?>
<?php
foreach( $posts as $post):
?>
<?php setup_postdata($post); ?>
<div>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
<span>Date début : <?php echo $date_debut ?></span>
</div>
<?php
endforeach;
?>
<?php wp_reset_postdata();?>
<?php
endwhile;endif;
?>
</div>
<?php
get_footer(); ?>
now i must merge the month and event similar.
but I do not know how…
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.