Custom Loop for The Events Calendar
-
Ive just upgrade the The Events calendat 2.05 and need help re-writing a custom loop I have in my home page. I cobbled this together using examples from the forums but really dont know where to beging to get it working with the upgrade.
What i had was this – which displayed events in the future only
Hope someone can help clean this up for me. Thnaks<?php $todaysDate = date('Y-m-d G:i:s', strtotime('-1 days')); $recentPosts = new WP_Query(); $recentPosts->query('showposts=5&category_name=Events&meta_key=_EventStartDate&meta_compare=>=&meta_value='.$todaysDate.'&orderby=_EventStartDate&order=ASC'); ?> <?php while ($recentPosts->have_posts()) : $recentPosts->the_post(); ?> <div class="hp_post"> <div class="post_thumb"> <?php if ( has_post_thumbnail()) : ?> <a>" title="<?php the_title_attribute(); ?>" > <?php the_post_thumbnail(array (100,100)); ?> </a> <?php endif; ?>
https://www.ads-software.com/extend/plugins/the-events-calendar/
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Custom Loop for The Events Calendar’ is closed to new replies.