Notice: Undefined variable: display formatting errors
-
Since updating to networks latest posts version 3.7 I’m getting this error message “Notice: Undefined variable: display in mysite.ca/wp-content/plugins/network-latest-posts/network-latest-posts.php on line 290” & the formatting is completely off. 9 posts are displaying all wonky instead of the 3 we had displaying previously. I updated to WordPress 4.2.2 at the same time. Any idea how to fix these issues?
I tried adding $display = ”; to line 199 of network-latest-posts.php but it didn’t help.
(This is occurring on our development site where I update the plugins first to ensure everything works before updating on the main site. It’s in Maintenance Mode & is not viewable to anyone who’s not logged in unfortunately. What it’s supposed to look like is down towards the middle-bottom < NEWS > section of this page http://www.engineering.utoronto.ca/)
Here is the code I’m using to display the latest posts:
‘<div class=”row” style=”margin-top:20px;”>
<div class=”col-md-12″>
<div id=”news-carousel” class=”carousel slide”>
<?php echo do_shortcode(‘[nlposts blog_id=”17,18″ number_posts=”9″ display_type=”block” sort_by_date=true thumbnail=true thumbnail_wh=”600×315″ use_pub_date=true full_meta=true]’); ?>
</div>
</div>
</div>
<div class=”row” style=”margin-top:30px;”>
<div class=”col-md-12 news-title”>
<i class=”fa fa-chevron-left fa-carousel”><span class=”sr-only”>Events Pervious</span></i>THIS WEEK’S EVENTS<i class=”fa fa-chevron-right fa-carousel”><span class=”sr-only”>Events Next</span></i>
</div>
</div>
<?php
//Custom Post-Type Events
//Today Date – YYYYMMDD
$todayDate = date(“Ymd”);
$args = array(
‘posts_per_page’ => -1,
‘offset’ => 0,
‘category’ => ”,
‘orderby’ => ‘FASE_event_date’,
‘order’ => ‘ASC’,
‘include’ => ”,
‘exclude’ => ”,
‘meta_key’ => ‘FASE_event_date’,
‘meta_value’ => $todayDate,
‘meta_compare’ => ‘>=’,
‘post_type’ => ‘events’,
‘post_mime_type’ => ”,
‘post_parent’ => ”,
‘post_status’ => ‘publish’,
‘suppress_filters’ => true
);
$allEvents = get_posts($args);
?>
<div class=”row”>
<div class=”col-md-12″>
<div id=”events-carousel” class=”carousel slide”>
<?php
$count = 0;
foreach ($allEvents as $key => $data) {
$eventDate = get_post_meta($data->ID, ‘FASE_event_date’, true);
$count++;
?>
<?php if ($count == 1) { ?>
<div class=”row rowContainer”>
<?php } ?>
<div class=”col-xs-12 col-sm-6 col-xs-12 event-item” data-date=”<?php echo $eventDate; ?>”>
<div class=”pull-left event-calendar”>
ID); ?>”>
<span class=”fa-stack fa-2x”>
<i class=”fa fa-square fa-stack-2x teal”></i>
<i class=”fa fa-calendar fa-stack-1x fa-inverse”></i>
</span>
<span class=”sr-only”>View more <?php echo $data->post_title; ?></span>
</div>
ID); ?>”>
<div class=”event-text”>
<span><?php echo date(“F j, Y”, strtotime($eventDate)); ?></span>
<p><?php echo $data->post_title; ?></p>
</div>
</div>
<?php
if (($count == 4) || ($key + 1 == count($allEvents))) {
$count = 0;
?>
</div>
<?php } ?>
<?php
}
?>
</div>
</div>
</div>
</div>’Many thanks!
The topic ‘Notice: Undefined variable: display formatting errors’ is closed to new replies.