Warning: array_shift() expects parameter 1 to be array, object given in /hermes/walnaweb01a/b1374/moo.peachdesigninccom/tools4hardwood/wp-content/themes/listings/homepage_loops/content-listingsum.php on line 18
Is an error I'm getting on this page http://www.tools4hardwoods.com/home-2/ and I'm having no luck. Can some one help me debug?
Heres the full code:
<div class="car-list">
<div class="car-img">
<?php if(has_post_thumbnail()): ?>
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail("home_listing"); ?></a>
<?php endif; ?>
</div>
<div class="car-info">
<a href="<?php the_permalink(); ?>"><h3><?php the_title(); ?></h3></a>
<h2 class="car-price"><?php get_listing_price(); ?></h2>
<ul class="car-tags clear">
<?php
global $post;
$configuration = get_listing_display_attributes($post->ID);
if ($configuration):
foreach ($configuration as $tax) {
$terms = get_the_terms($post->ID,$tax);
if ($terms):
$term = array_shift($terms);
$term_link = get_term_link($term->slug,$term->taxonomy);
$term_name = $term->name;
$taxonomy = get_taxonomy($term->taxonomy);
?>
<a href="<?php echo $term_link; ?>"><?php echo $term_name; ?></a>
<?php
endif;
}
endif;
?>
</ul>
</div>
<div style="clear:both;"></div>
</div>
print_r($terms)? It's not an array here. WP says it can return false.