WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: The Events Calendar] Display the events on a page (1 post)

  1. AardvarkGirl
    Member
    Posted 1 year ago #

    Instead of using the widget, and having the list of X number of events in the sidebar, I'd like to put that (exact same output as the widget) on a page (template).

    I found this post (from 2 years ago) http://wordpress.org/support/topic/plugin-the-events-calendar-display-the-events-in-front-page but this code snippet did not work;

    <?php query_posts($query_string . '&category_name=events'); ?>
    	<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    		<?php if(the_event_start_date(null, false, mdY) >= date(mdY)) : ?>
    		<li class="event">
    			<?php if ( is_new_event_day() ) : ?><h4 class="event-day"><?php echo the_event_start_date( null, false ); ?></h4><?php endif; ?>
    			<div class="event-content">
    				<?php the_title('<h2 class="event-title"><a href="' . get_permalink() . '" title="' . the_title_attribute('echo=0') . '" rel="bookmark">', '</a></h2>'); ?>
    				<?php the_excerpt() ?>
    			</div>
    		</li>
    	<?php endif; ?>
    <?php endwhile; else: ?>
    	<p>No Events</p>
    <?php endif; ?>

Topic Closed

This topic has been closed to new replies.

About this Topic