Beispiel #1
0
<?php

/**
 * The template part for displaying the post content.
 *
 * Learn more: http://codex.wordpress.org/Template_Hierarchy
 *
 * @package Rock
 */
$event_data = ctc_event_data();
$address = $event_data['address'];
?>

<?php 
if ($address) {
    ?>
<div class="rock-event-full-map">
	<iframe class="event-map" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.it/maps?q=<?php 
    echo urlencode($address);
    ?>
&output=embed"></iframe>
</div>
<?php 
}
?>

<div class="entry-content">
	<?php 
if (is_category() || is_archive()) {
    the_excerpt();
} else {
Beispiel #2
0
    echo $settings->title;
    ?>
</h1>
    <?php 
}
// Get posts
$posts = ctc_get_events($instance);
// get events based on options - upcoming/past, limit, etc.
// Loop posts
$i = 0;
foreach ($posts as $post) {
    setup_postdata($post);
    $i++;
    // Get event meta data
    // $date (localized range), $start_date, $end_date, $time, $venue, $address, $show_directions_link, $directions_url, $map_lat, $map_lng, $map_type, $map_zoom
    extract(ctc_event_data());
    ?>

    <div class="fb-events--event">

      <?php 
    if ($instance['show_image'] == 'yes' && has_post_thumbnail()) {
        ?>
        <a class="fb-events--event-image" href="<?php 
        the_permalink();
        ?>
" title="<?php 
        the_title_attribute();
        ?>
">
          <?php