T_ENDWHILE error
-
Hi there, i’m getting a
Parse error: syntax error, unexpected ‘endwhile’ (T_ENDWHILE)This is whats causing it to break
<div class="carousel-inner" role="listbox"> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); $i++; ?> <?php if ($i==1) { ?> <div class="item active"> <?php } else { ?> <div class="item"> <?php if ( has_post_thumbnail ()) { $url = wp_get_attachment_url( get_post_thumbnail_id()); ?> <img src="<?php echo $url; ?>" alt="<?php the_title(); ?>"> <?php } ?> <div class="container"> <div class="carousel-caption"> <h1><?php the_title(); ?></h1> <p><a class="btn btn-lg btn-primary" href="<?php the_permalink(); ?>" role="button">Read more</a></p> </div> </div> </div> <?php endwhile; endif; ?>
Any help would be appreciated!
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘T_ENDWHILE error’ is closed to new replies.