hi i am an italian webmaster. i use wordpress 2.5.1 now, on local machine with easy php, but, in index.php, comments.php and other page i have this error Parse error: parse error, unexpected T_ELSE in C:\Programmi\EasyPHP 2.0b1\www\wordpress\wp-content\themes\Organic\index.php on line 66 PHP: how can i correct it ? please help me! this is index source code <?php get_header(); ?> <div id="content"> <?php query_posts('showposts=' .$pt_index_posts ); ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); $loopcounter++; ?> <div class="posts"> <div class="xsnazzy"> <b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b> <div class="xboxcontent"> <h3 class="h1" id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"> <?php the_title(); ?> </a></h3> <div class="post_top"> <span class="auth">Pubblicato da <?php the_author_posts_link(); ?> <?php the_time('j F, Y') ?> </span> <span class="commentp"> <?php comments_popup_link('(0) Comment', '(1) Comment', '(%) Comment'); ?> </span> </div> <!--read more--> <?php the_content('Read the rest of this entry'); ?> <!--Rateing--> <?php if(function_exists('the_ratings')) { the_ratings(); } ?> <!--Rateing end--> <div class="post_bottom"> <div class="post_bottom2"> <span class="category">Categorie : <?php the_category(',') ?> </span> <span class="tags">Tags : <?php if (function_exists('the_tags')) { ?> <?php the_tags( ', '); ?> <?php } ?> </span> </div> </div> <!--post bottom end --> </div> <b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"></b></b> </div> <!--Post Meta--> </div> <?php if ($loopcounter <= 1) { include (TEMPLATEPATH . '/google_ads.php'); } ?> <!--post end --> <?php endwhile; ?> <!-- Prev/Next page navigation --> <div class="pagenavi"> <?php if(function_exists('wp_pagenavi')) { ?> <div class="wp-pagenavi"> <?php wp_pagenavi(); ?> </div> <?php } else {?> <div class="page-nav"> <div class="nav-previous"> <?php previous_posts_link('Previous Page') ?> </div> <div class="nav-next"> <?php next_posts_link('Next Page') ?> </div> </div> <? } ?> </div><!--page navi end --> <?php else : {?> <div class="xsnazzy"> <b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b> <div class="xboxcontent"> <h3>Sorry, no posts matched your criteria.</h3> <p>Please try searching again here...</p> <div class="search404"> <?php include(TEMPLATEPATH."/searchform.php");?> </div> <p class="clear"><strong>Or, take a look at Archives and Categories</strong></p> <div class="scategory"> <h2> <?php _e('Category'); ?> </h2> <ul> <?php wp_list_categories('orderby=name&title_li'); ?> </ul> </div> <div class="archives"> <h2 class="sidebartitle"> <?php _e('Archives'); ?> </h2> <ul> <?php wp_get_archives('type=monthly'); ?> </ul> </div> </div> <b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"></b></b> </div> <?php endif; ?> </div> <!--include sidebar--> <?php get_sidebar(); ?> <!--include footer--> <?php get_footer(); ?> PHP: PS: another problem, when i post a comment on a post, i recive this messages in different part of posting page: comment_type == "trackback" || $comment->comment_type == "pingback" || ereg("", $comment->comment_content) || ereg("", $comment->comment_content)) { ?> i attend . tanks
For the T_ELSE, try changing this: <?php else : {?> <div class="xsnazzy"> <b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b> PHP: to this: <?php else { ?> <div class="xsnazzy"> <b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b> PHP:
i know its must be a late reply but i was stuck with the same error in this template yesterday. somehow my friend figured it out for me. coz i am nill in php. i would like to share it. there is just one simple change you have to make. replace your line 68 <?php else : {?> Code (markup): with <?php } else :?> Code (markup): it will work out, for sure