Support » Themes and Templates » Error in PHP Code – Help!

  • Hi,

    I’m trying to build my first theme using the excellent tutorial at Line25.com but having trouble getting part of their code to work…

    <?php get_header(); ?>
    
    <duv id="main">
    <div id="content">
    
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    
    <div <?php post_class(); ?>>
    
    <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    
    <?php if (has_post_thumbnail() ) { ?>
    <a href="<?php the_permalink(); ?>" class="post-thumnail"><?php the_post_thumbnail(); ?></a>
    <?php else {?>
    <a href="<?php the_permalink(); ?>" class="post-thumbnail"><img src="<?php bloginfo('template_url');
    <?php } ?>

    Is highlighting errors with <?php else {?> and <?php } ?> and i’m not sure why as i’m a php novice!!

    Any help would be appreciated,

    Thanks

Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Error in PHP Code – Help!’ is closed to new replies.