• Resolved breathelifein

    (@biellebrunner)


    I was updating some pages on my website, and when I tried to see if all was well, I got this error message:

    Parse error: syntax error, unexpected T_ENDWHILE in /home/…/page.php on line 22
    This is page.php

    <?php get_header(); ?>
    
    <p align="center">
    	<span class="title">
    		<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    		<id="post-<?php the_ID(); ?>"><?php the_title(); ?>
    	</span>
    
    	<div class="news">
    		<?php the_content('Leia o restante da página &raquo;'); ?>
    		<?php link_pages('<p><strong>Páginas:</strong> ', '</p>', 'número'); ?>
    
    		<?php endwhile; endif; ?>
    
    		<h4><center><a href="javascript:history.go(-1)">&laquo;&laquo; Voltar</a> | <a href="#">Topo</a> <?php edit_post_link('(editar)'); ?></center></h4>
    
    	</div>
    </p>
    
    <?php comments_template(); ?>
    
    <?php endwhile; else: ?>
    <p><?php _e('Lamento, página não encontrada.'); ?></p>
    <?php endif; ?>
    
    <?php get_footer(); ?>

    Line 22 is <?php endwhile; else: ?>

    It was working fine until recently, and I haven’t touched these php files in ages, so I have no clue as to why this happened now. Does anyone have an idea of what’s wrong?
    Thanks.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘"Parse error: syntax error, unexpected T_ENDWHILE"’ is closed to new replies.