Title: Error: unexpected $end
Last modified: August 20, 2016

---

# Error: unexpected $end

 *  [Chofas](https://wordpress.org/support/users/chofas/)
 * (@chofas)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/error-unexpected-end/)
 * Hi there, I’m trying to add a featured post area to my blog, and I did the following
   code:
 *     ```
       <?php $my_query = new WP_Query('category_name=Floreria&showposts=1');
        while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID; ?>
         <div id="feature">
           <h2 class="post-title">
           	<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
           </h2>
           	<?php the_excerpt(); ?>
           	<?php edit_post_link(__('Editar'), ", ' | '); ?>
         </div>
       <?php endwhile; ?>
       ```
   
 * But I can’t figure why I’m getting this error:
 * Parse error: syntax error, unexpected $end in ******/floreria.php on line 10
 * If someone could help me figure it out.
 * Thanks

The topic ‘Error: unexpected $end’ is closed to new replies.

## Tags

 * [endwhile](https://wordpress.org/support/topic-tag/endwhile/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [Chofas](https://wordpress.org/support/users/chofas/)
 * Last activity: [14 years, 11 months ago](https://wordpress.org/support/topic/error-unexpected-end/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
