Example #1
0
/**
 * Display or retrieve the link to the current gig.
 *
 * @since 1.0.0
 *
 * @param array $args Optional. Passed to get_audiotheme_gig_link()
 * @param bool $echo Optional. Default to true. Whether to display or return.
 * @return string|null Null on failure or display. String when echo is false.
 */
function the_audiotheme_gig_link($args = array(), $echo = true)
{
    $html = get_audiotheme_gig_link(null, $args);
    if ($echo) {
        echo $html;
    } else {
        return $html;
    }
}
Example #2
0
?>

<?php 
if ($loop->have_posts()) {
    ?>

	<?php 
    while ($loop->have_posts()) {
        $loop->the_post();
        ?>

		<dl class="vevent" itemscope itemtype="http://schema.org/MusicEvent">

			<?php 
        $gig = get_audiotheme_gig();
        echo get_audiotheme_gig_link($gig, array('before' => '<dt>', 'after' => '</dt>'));
        ?>

			<?php 
        if (audiotheme_gig_has_venue()) {
            ?>
				<dd class="location">
					<a href="<?php 
            the_permalink();
            ?>
"><span class="gig-title"><?php 
            echo get_audiotheme_gig_location();
            ?>
</span></a>
				</dd>
			<?php