This code works on my WAMP localhost, but not on the Godaddy server, I checked the php versions and they are the same, been having a tough time trying to figure out what the issue is. Any one have suggestions? Thank You
website: http://ift.tt/1mOQGir
<div id="index-row3" class="widthfull clearfix">
<img src="<?php print IMAGES; ?>/upcoming_events.png" title="Arctic playhouse shows" class="alignleft upcoming"/>
<div class="wrapper-events width100 alignleft">
<?php
global $post;
// Retrieve the next 5 upcoming events
$date = new DateTime();
$events = tribe_get_events( array(
'posts_per_page' => 5,
'start_date' => strtotime($date->format('Y-m-d'))
) );
foreach ( $events as $post ) {
setup_postdata( $post );
$tribeDate = tribe_get_start_date();
$displayDate = explode(" ", $tribeDate);
?>
<article id="event-<?php the_ID(); ?>" <?php post_class(); ?>>
<div id="event-post" class="alignleft">
<div class="alignleft">
<ul class="event-date">
<li class="month"><?php echo substr($displayDate[0], 0, 3); ?></li>
<li class="day"><?php echo $displayDate[1]; ?></li>
<li class="event-time"><?php echo $displayDate[2]; ?> <?php echo $displayDate[3]; ?></li>
</ul>
</div>
<h2><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<div id="event-content">
<a href="<?php the_permalink(); ?>" class="alignleft"><?php the_post_thumbnail('home-events-image'); ?></a>
<div class="alignleft info">
<?php the_excerpt(); ?>
</div>
<div class="alignleft price">
<p>Price: <?php echo "$" . tribe_get_cost(); ?></p>
</div>
</div>
</div>
</article>
<?php
}
?>
<?php
if($events == null) {
?>
<article>
<div id="event-post-none" class="alignleft">
<div class="aligncenter">
<p>There are no upcoming events. Please check back soon.</p>
</div>
</div>
</article>
<?php } ?>
</div>
<img src="<?php print IMAGES; ?>/upcoming_events-btm.png" title="Arctic playhouse shows" class="alignleft upcoming" />
</div>
<?php endwhile; endif; ?>
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire