The code below is for my single.php. The php if ( have_posts() ) calls the standard wordpress feature image and the function_exists('dfi_get_featured_images') sections grabs slider images that are wrapped in nivo-slider styling.
The php if ( have_posts() ) loop is breaking the script. I tried to include it in an if else statement to only show the wordpress featured image if there are no slide images in the post if($featuredImages!=NULL).
Any help on the coding would be great.
Thanks...Lee
<div id="featured" class="row-fluid">
<?php
if ( function_exists('dfi_get_featured_images') ) {
$featuredImages = dfi_get_featured_images();
if( !is_null($featuredImages) ){
echo "<div class='slider-wrapper theme-default'>";
echo "<div class='entry-thumbnail nivoSlider' style='width: 1170px;'>";
foreach($featuredImages as $images) {
echo "<a href='" . get_permalink() . "' title = '" . dfi_get_image_alt_by_id($images['attachment_id']) . "'>";
echo "<img src = '" . $images['thumb'] . "' />";
echo "</a>";
}
echo "</div>";
echo "</div>";
}
}
if($featuredImages!=NULL)
{
}
else
{
<?php if ( have_posts() ) { ?>
<?php while ( have_posts() ) { ?>
<?php the_post(); ?>
<?php if ( '' != get_the_post_thumbnail() ) { ?>
<?php the_post_thumbnail( 'full' ); ?>
<?php } // end if ?>
<?php } // end while ?>
<?php } // end have_posts ?>
}
?>