0

I've debugged my index file and filtered out my code. Turns out that if I use the following code, the site returns an "unexpected end of file" error. If I remove it, the site appears with no errors. So I'm not sure if I am missing any syntax code or if there is a typo.

 <?php

 // The Query
 query_posts( 'cat=9614&posts_per_page=5&tag=review' );

 // The Loop
 while ( have_posts() ) : the_post();
 ?>
 <li>
 <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
 </li>
 <?
 endwhile;

 // Reset Query
 wp_reset_query();

 ?>

1 Answer 1

6

Use <?php instead of <?

<?php

 // The Query
 query_posts( 'cat=9614&posts_per_page=5&tag=review' );

 // The Loop
 while ( have_posts() ) : the_post();
 ?>
 <li>
 <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
 </li>
 <?php // error is here
 endwhile;

 // Reset Query
 wp_reset_query();

 ?>
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks bud! 85-90% of my mistakes in code are small/minor/hidden errors. Site is back up now with the revised code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.