Syntax error index.php help
-
Hi there. I am creating my first ever basic theme to get to used to coding and creating themes for WordPress but I have hit some syntax errors and would love some help / guidance. I am having problems with “<?php endwhile; ?>” and “<?php else : ?>”
Testing local error
Parse error: syntax error, unexpected ‘endwhile’ (T_ENDWHILE) in C:\xampp\htdocs\wordpress\wp-content\themes\danielwaddon\index.php on line 13
<?php get_header(); ?> <?php if (have_posts()) ; ?> <?php while (have_posts()) ; the_post(); ?> <article <?php post_class() ?> id='post-<?php the_ID(); ?>"> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> posted on: <?php echo get_the_date(); ?> at <?php echo get_the_time(); ?> Posted in: <?php the_category(','); ?> <?php the_content('Read More..'); ?> posted by: <?php the_author(); ?> | <?php comments_popup_link('No Comments','1 Comments','% Comments'); ?> </article> <?php endwhile; ?> <?php next_post_link('« Previous Entries') ?> <?php previous_post_link('Next Entries »') ?> <?php else : ?> <p>Not Found</p> <p>Sorry, but you are looking for something that isn't here.</p> <?php endif; ?> </section> <?php get_sidebar(); ?> <?php get_footer(); ?>
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Syntax error index.php help’ is closed to new replies.