• Resolved decentguy49

    (@decentguy49)


    I am getting :-
    syntax error, unexpected T_ENDWHILE in /home/techn94c/public_html/wp-content/themes/TA/index.php on line 32
    error on my website, here is my Index.php file copy :-

    <?php get_header(); ?>
    
        <div id="blog">
    
            <div class="post">
    
    		<div <?php post_class(); ?>>
    
    		<div class="post-date">
    
    <div class="month"><?php the_time('M') ?></div>
    
    <div class="day"><?php the_time('d') ?></div>
    
    </div>
    
    		<h1><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
    
                <div class="entry">
    
                    <table><tr><td><?php the_excerpt(); ?></td><td><?php if ( has_post_thumbnail() ) {
    
    the_post_thumbnail();
    
    }
    
    elseif( catch_that_image() ) { ?>
    
    <img src="<?php echo catch_that_image(); ?>" width="64" height="64" alt="<?php the_title_attribute(); ?>" />
    
    <?php } else { ?>
    
    <img src="http://www.technoarea.in/wp-content/themes/TA/images/TA_Logo.png" width="64" height="64" alt="<?php the_title_attribute(); ?>" />
    
    <?php } ?>
    
    </td></tr></table>
    
                    <div class="cleared"></div>
    
                </div>
    
            </div>
    
    		</div>
    
    <?php endwhile; ?>
    
            <center><?php if (function_exists("pagination")) {
    
        pagination($additional_loop->max_num_pages);
    
    } ?></center>
    
            <?php endif; ?>
    
        </div>
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>

    plz help as soon as possible

Viewing 13 replies - 1 through 13 (of 13 total)
  • Comment “endwhile” and “endif” in your code because you are ending statement without starting it.

    Thread Starter decentguy49

    (@decentguy49)

    plz tell me which statement ur taking about and what should i put there

    Search “endwhile;” and “endif;” and comment (//) them as follows in your code:

    <?php //endwhile; ?>
    <?php //endif; ?>

    Thread Starter decentguy49

    (@decentguy49)

    thnkx for your support but nw web site showing 1 post on a page :- see here http://www.technoarea.in

    1. Add the following code just after get_header() function:

    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

    2. Uncomment endwhile and endif as it was earlier.

    Thread Starter decentguy49

    (@decentguy49)

    nw whole theme seems unstyled

    I just checked your site and one extra div is closing just before “endwhile” and it is causing unstyle. So remove one “</div>” tag just before “endwhile”.

    Thread Starter decentguy49

    (@decentguy49)

    did but not work

    I have written your whole code with modification, please check the following:

    <?php get_header(); ?>
    <div id="blog">
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    	<div class="post">
    		<div <?php post_class(); ?>>
    		<div class="post-date">
    			<div class="month"><?php the_time('M') ?></div>
    			<div class="day"><?php the_time('d') ?></div>
    		</div>
    
    		<h1><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
    		<div class="entry">
    			<table><tr><td><?php the_excerpt(); ?></td><td><?php if ( has_post_thumbnail() ) {
    				the_post_thumbnail();
    				} elseif( catch_that_image() ) { ?>
    					<img src="<?php echo catch_that_image(); ?>" width="64" height="64" alt="<?php the_title_attribute(); ?>" />
    				<?php } else { ?>
    					<img src="http://www.technoarea.in/wp-content/themes/TA/images/TA_Logo.png" width="64" height="64" alt="<?php the_title_attribute(); ?>" />
    				<?php } ?>
    			</td></tr></table>
    			<div class="cleared"></div>
    		</div>
    	</div>
    <?php endwhile; ?>
    <center><?php if (function_exists("pagination")) {
    	pagination($additional_loop->max_num_pages);
    } ?></center>
    <?php endif; ?>
    </div>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Thread Starter decentguy49

    (@decentguy49)

    its working dont know what i did but now its working anyways thanx

    Please mark the issue as resolved.

    Thread Starter decentguy49

    (@decentguy49)

    did

    Thanks

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Getting syntax error, unexpected T_ENDWHILE Error’ is closed to new replies.