Christian

Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • in reply to: How to customize the upcoming events loop #1029906
    Christian
    Participant

    Hi Brook,

    Hope you have a chance to look at the issue soon! 🙂

    Thanks!

    in reply to: How to customize the upcoming events loop #1028681
    Christian
    Participant

    Hi Brook!

    So 2 examples of recurring events would be:
    http://104.131.139.81/calendar/corporate-tax-installments/all/ and
    http://104.131.139.81/calendar/corporate-tax-returns/all/

    They should repeat at the end of every month.

    THanks!

    in reply to: How to customize the upcoming events loop #1028224
    Christian
    Participant

    I edited my previous post, but it seemed to delete what I wrote. I meant to show you the link to where I have this code: http://104.131.139.81 (Mark your calendar section on sidebar)

    I hope you can spot what the issue is!

    Thanks!

    in reply to: How to customize the upcoming events loop #1028223
    Christian
    Participant
    <?php 
                      $date = getdate(); 
                     
                     //Retrieve date 2 months down the road
                     $date = new DateTime("+2 months");
                     $date = $date->format('YYYY-mm-dd');
                     //Query posts within the 2 month window
                     query_posts(array( 'post_type' => 'tribe_events', 'posts_per_page' => -1, 'end_date'=>date('Y-m-d', strtotime('+60 days'))) ); 
                    
                     //Initialize variable
                     $currentDate = '';
                   
                    if (have_posts()) : while (have_posts()) : the_post(); $url = esc_url( get_permalink( tribe_get_venue_id( $post->ID))); ?>
                     <?php 
                     //Grab  current event date
                     
                     $eventDate = tribe_get_start_date($post->ID, true, $format = 'F j, Y' ); 
                        
                      //If the current event date does not match the variable, print the date heading
                      if ($currentDate != $eventDate){
                           echo "</ul><h3>".$eventDate."</h3><ul>"; }
                      
                        
                        //Update the date variable to the most recent event
                      $currentDate = $eventDate;
                     ?>
                        
                         <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>  
                    
                            
                            <?php endwhile; ?>
                            </ul>
                            <?php endif; ?>
    in reply to: How to customize the upcoming events loop #1028220
    Christian
    Participant

    Hi Brook!

    Sure! Here is the code that I have:

    <?php 
                      $date = getdate(); 
                     
                     //Retrieve date 2 months down the road
                     $date = new DateTime("+2 months");
                     $date = $date->format('YYYY-mm-dd');
                     //Query posts within the 2 month window
                     query_posts(array( 'post_type' => 'tribe_events', 'posts_per_page' => -1, 'end_date'=>date('Y-m-d', strtotime('+60 days'))) ); 
                    
                     //Initialize variable
                     $currentDate = '';
                   
                    if (have_posts()) : while (have_posts()) : the_post(); $url = esc_url( get_permalink( tribe_get_venue_id( $post->ID))); ?>
                     <?php 
                     //Grab  current event date
                     
                     $eventDate = tribe_get_start_date($post->ID, true, $format = 'F j, Y' ); 
                        
                      //If the current event date does not match the variable, print the date heading
                      if ($currentDate != $eventDate){
                           echo "</ul><h3>".$eventDate."</h3><ul>"; }
                      
                        
                        //Update the date variable to the most recent event
                      $currentDate = $eventDate;
                     ?>
                        
                         <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>  
                    
                            
                            <?php endwhile; ?>
                            </ul>
                            <?php endif; ?>

    It seems to only be outputting the first instance of a recurring event. The link to the site I have it working is here (The Mark your calendar section):
    http://104.131.139.81/

    I hope you can spot the problem 🙂
    Thanks!

    • This reply was modified 10 years, 6 months ago by Christian.
    in reply to: How to customize the upcoming events loop #1027205
    Christian
    Participant

    Hi Brook!

    Thanks! I was able to almost get it to work. The only issue is that the recurring events aren’t showing in the loop. Is there something else I need to take into account to show all the recurring events within that period?

    Thanks!

Viewing 6 posts - 1 through 6 (of 6 total)