• Resolved soulstatic

    (@soulstatic)


    Is there any way to do that?

    Here’s my loop:

    $fields = CFS()->get('appearances');
    
                            foreach ($fields as $field) {
                         if ($field['date'] > date('Y-m-d', strtotime('today'))) { ?>
                           <?php echo '
    	                       <div class="row">
    	                      <div class="col-md-4"><img src="'.$field['image'].'" /></div>
    	                      <div class="col-md-8">
    	                        <p><strong>'.date('F j, Y', strtotime($field['date'])).'</strong></p>
    	                           <h2><a target="_blank" href="'.$field['event_website'].'">'.$field['event'].'</a></h2>
    	                               <h3>'.$field['subtitle'].'</h3>
    	                               <p>'.$field['event_details'].'</p>
    	                               <div class="event-meta-data">
    	                               <div class="row">
    	                      <div class="col-md-6">
    	                      <h4>Location:</h4>
    	                      <p><strong>'.$field['location'].'</strong><br />
    	                      '.$field['address'].'<br />
    	                      '.$field['city_and_state'].' '.$field['zip_code'].'
    	                       </p>
    	                      	                      </div>
    	                      <div class="col-md-6">
    	                      <h4>Time:</h4>
    	                      <p> '.$field['time'].'</p>
    	                      <h4>Event Site:</h4>
    	                      <p><a target="_blank" href=" '.$field['event_website'].'">Learn more>></a></p>
    	                      <h4>Cost:</h4>
    	                       <p> '.$field['cost'].'</p>
    	                      </div>
    	                     		 </div>
    	                     		 </div>
    	                     		 </div>
    	                               </div>
    
    	                               		<hr />
    	                               ' ?>
    	                                <?php   }  ?>
    	                                <?php   }  ?>

    https://www.ads-software.com/plugins/custom-field-suite/

Viewing 1 replies (of 1 total)
  • Plugin Author Matt Gibbs

    (@mgibbs189)

    A loop field contains an array of arrays.

    It’s up to you to manipulate the data as needed. We unfortunately don’t have to resources to provide specific guidance or examples. Find a developer to help if needed.

Viewing 1 replies (of 1 total)
  • The topic ‘Order Loop fields by Date’ is closed to new replies.