Skip to content

Instantly share code, notes, and snippets.

@kjtolsma
Created September 10, 2013 14:08
Show Gist options
  • Save kjtolsma/6509926 to your computer and use it in GitHub Desktop.
Save kjtolsma/6509926 to your computer and use it in GitHub Desktop.
Pronamic Events Widget
<?php if ( have_posts() ) : ?>
<?php
if ( ! empty( $title ) ) {
echo $before_title . $title . $after_title;
}
?>
<ul>
<?php while ( have_posts() ) : the_post(); ?>
<li>
<a href="<?php the_permalink() ?>" title="<?php echo esc_attr( get_the_title() ? get_the_title() : get_the_ID() ); ?>"><?php if ( get_the_title() ) the_title(); else the_ID(); ?></a><br />
<?php if ( pronamic_get_the_start_date() == pronamic_get_the_end_date() ) : ?>
<?php pronamic_the_start_date(); ?> <br />
<?php else : ?>
<?php pronamic_the_start_date(); ?> / <?php pronamic_the_end_date(); ?><br />
<?php endif; ?>
</li>
<?php endwhile; ?>
</ul>
<?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment