• Hi all,

    I’m not a coder but i’m getting the nack of changing code to do what i want it to do. This tinme however i’m getting an unexpectd t_endwhile errr on line 143

    Any ideas?

    <?php get_header(); ?>
    
    <div id="content">
    
    	<div id="contentleft"> <!-- The content Left isthe left column.-->		
    
    		<div class="postarea"> <!-- The postarea is where the post will appear.-->
    
    			<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    				<!-- TWEETS RULE .-->
    				<?php if (is_category('28')) { ?>
    				<p class="tweet_content">
    				<img src="<?php bloginfo('template_directory');?>/images/CatThumbsTWEET.jpg" alt="<?php the_title(); ?>" />
    				<?php the_content(__('[Read more]'));?>
    					<p class="tweet_date"> tweeted on: <?php the_time('j M Y'); ?>
    					</p>
    				</p>
    
    				<?php } else { ?>
    
    				<!-- CAT THUMBS RULE .-->
    
    				<?php if( get_post_meta($post->ID, "hpbottom", true) ): ?>
    					<b>
    					<a href="<?php the_permalink() ?>" rel="bookmark">
    					<img style="float:left;margin:0px 10px 0px 0px;" src="<?php echo get_post_meta($post->ID, "hpbottom", true); ?>" alt="<?php the_title(); ?>" />
    					</a>
    					<?php else: ?>
    
    					<a href="<?php the_permalink() ?>" rel="bookmark">
    					<?php $image_set = 0;
    
    					if ( in_category('3') &amp;&amp; $image_set ==0) { ?>
    					<img class="cat_tag" src="<?php bloginfo('template_directory');?>/images/CatThumbsARG.jpg" />
    					<?php $image_set = 1;
    
    					} else if ( in_category('4') &amp;&amp; $image_set ==0) { ?>
    					<img class="cat_tag" src="<?php bloginfo('template_directory');?>/images/CatThumbsBikes.jpg" />
    					<?php $image_set = 1;
    
    					} else if ( in_category('5') &amp;&amp; $image_set ==0) { ?>
    					<img class="cat_tag" src="<?php bloginfo('template_directory');?>/images/CatThumbsChurch.jpg" />
    					<?php $image_set = 1;
    
    					} else if ( in_category('6') &amp;&amp; $image_set ==0) { ?>
    					<img class="cat_tag" src="<?php bloginfo('template_directory');?>/images/CatThumbsFamily.jpg" />
    					<?php $image_set = 1;
    
    					} else if ( in_category('7') &amp;&amp; $image_set ==0) { ?>
    					<img class="cat_tag" src="<?php bloginfo('template_directory');?>/images/CatThumbsFilm.jpg" />
    					<?php $image_set = 1;
    
    					} else if ( in_category('8') &amp;&amp; $image_set ==0) { ?>
    					<img class="cat_tag" src="<?php bloginfo('template_directory');?>/images/CatThumbsFriends.jpg" />
    					<?php $image_set = 1;
    
    					} else if ( in_category('9') &amp;&amp; $image_set ==0) { ?>
    					<img class="cat_tag" src="<?php bloginfo('template_directory');?>/images/CatThumbsGen.jpg" />
    					<?php $image_set = 1;
    
    					} else if ( in_category('10') &amp;&amp; $image_set ==0) { ?>
    					<img class="cat_tag" src="<?php bloginfo('template_directory');?>/images/CatThumbsGod.jpg" />
    					<?php $image_set = 1;
    
    					} else if ( in_category('11') &amp;&amp; $image_set ==0) { ?>
    					<img class="cat_tag" src="<?php bloginfo('template_directory');?>/images/CatThumbsFriends.jpg" />
    					<?php $image_set = 1;
    
    					} else if ( in_category('12') &amp;&amp; $image_set ==0) { ?>
    					<img class="cat_tag" src="<?php bloginfo('template_directory');?>/images/CatThumbsN95.jpg" />
    					<?php $image_set = 1;
    
    					} else if ( in_category('13') &amp;&amp; $image_set ==0) { ?>
    					<img class="cat_tag" src="<?php bloginfo('template_directory');?>/images/CatThumbsPhotos.jpg" />
    					<?php $image_set = 1;
    
    					} else if ( in_category('14') &amp;&amp; $image_set ==0) { ?>
    					<img class="cat_tag" src="<?php bloginfo('template_directory');?>/images/CatThumbsProfound.jpg" />
    					<?php $image_set = 1;
    
    					} else if ( in_category('15') &amp;&amp; $image_set ==0) { ?>
    					<img class="cat_tag" src="<?php bloginfo('template_directory');?>/images/CatThumbsSad.jpg" />
    					<?php $image_set = 1;
    
    					} else if ( in_category('16') &amp;&amp; $image_set ==0) { ?>
    					<img class="cat_tag" src="<?php bloginfo('template_directory');?>/images/CatThumbsTechie.jpg" />
    					<?php $image_set = 1;
    
    					} else if ( in_category('17') &amp;&amp; $image_set ==0) { ?>
    					<img class="cat_tag" src="<?php bloginfo('template_directory');?>/images/CatThumbsTunage.jpg" />
    					<?php $image_set = 1;
    
    					} else if ( in_category('18') &amp;&amp; $image_set ==0) { ?>
    					<img class="cat_tag" src="<?php bloginfo('template_directory');?>/images/CatThumbsVideo.jpg" />
    					<?php $image_set = 1;
    
    					} else if ( in_category('19') &amp;&amp; $image_set ==0) { ?>
    					<img class="cat_tag" src="<?php bloginfo('template_directory');?>/images/CatThumbsWooYay.jpg" />
    					<?php $image_set = 1;
    
    					} else if ( in_category('20') &amp;&amp; $image_set ==0) { ?>
    					<img class="cat_tag" src="<?php bloginfo('template_directory');?>/images/CatThumbsGen.jpg" />
    					<?php $image_set = 1;
    
    					} else if ( in_category('25') &amp;&amp; $image_set ==0) { ?>
    					<img class="cat_tag" src="<?php bloginfo('template_directory');?>/images/CatThumbsWP.jpg" />
    					<?php $image_set = 1;
    
    					} ?>
    
    				<?php endif; ?>	
    
    				<!-- END CAT THUMBS RULE .-->
    
    					<?php the_title(); ?>
    					</a> - <?php the_category(', '); ?> - <?php the_time('j M Y'); ?>
    					</b>
    					<?php the_content(__('[Read more]'));?>
    
    					<div style="border-bottom:1px dotted #2255AA; margin-bottom:10px; padding:0px 0px 10px 0px; clear:both;"></div>
    
    		<?php endwhile; else: ?>
    
    			<p><?php _e('Sorry, no posts matched your criteria.'); ?></p><?php endif; ?>
    
    <?php include(TEMPLATEPATH."/sidebar.php");?>
    
    </div>
    
    <!-- The main column ends  -->
    
    <?php get_footer(); ?>
Viewing 1 replies (of 1 total)
  • Thread Starter irishmark

    (@irishmark)

    I should explain this a bit more

    I hae automated my tweeting so that if i use twitter it appears on my blog and vice versa.

    However i want to use a diffrent layout for my tweets. So the argument should be:

    If its catagory 28 then display like this

    if not then do it like this – then it should go on to the next step where i have it displying an appropriateimage for each catagory.

Viewing 1 replies (of 1 total)
  • The topic ‘unexpected T_ENDWHILE line 143’ is closed to new replies.