Support

Account

Home Forums General Issues Order by Date picker inside Repeater

Unread

Order by Date picker inside Repeater

  • Based on these docs, how is it possible to order my list of links in DESC order according to the date picker’s entry and have them grouped by month?

    BTW, these links will be linking to external urls, and will not be linking to internal posts.

    A visual example of what I’m trying to accomplish: https://cloudup.com/c965_bqqrBi

    My current source:

    <ul>
    <?php
    if( have_rows('weekly_update') ):
    while ( have_rows('weekly_update') ) : the_row(); ?>
    
    <?php $date = DateTime::createFromFormat('Ymd', get_sub_field('date')); ?>
    
    <li><a class="link-block" href="<?php echo get_sub_field('link'); ?>" >Weekly Update &ndash; <?php echo $date->format('n/j/Y'); ?></a></li>
                                             
    <?php endwhile; else : ?>
    <?php endif; ?>
    </ul>
    
Viewing 1 post (of 1 total)

The topic ‘Order by Date picker inside Repeater’ is closed to new replies.