14.05.2011, 07:44
|
#1 (permalink)
|
| PostRank: 0
Registriert seit: 14.05.2011
Beiträge: 12
| unexpected T_ENDWHILE in / ... Hallo,
Ich nutze da Theme minimal20 und bekomme beim Einbau eines Php Codes folgenden Fehler: Zitat: |
Parse error: syntax error, unexpected T_ENDWHILE in /var/www/web95/html/wp-content/themes/minimal20/index.php on line 88
| Der einzubauende Code läuft sonst bei anderen Seiten im Web problemlos. Es scheint sich um folgende Zeilen zu handeln: PHP-Code: <?php endwhile; endif; ?>
<?php if (is_front_page()) { ?> Lasse ich diese 2 Zeilen des vorgegebenen codes weg, werden die letzen Artikel richtig angezeigt, allerdings nicht nur auf der statischen Startseite, sondern eben auch bei allen anderen statischen Pages.
Ich habe schon rumprobiert, da ich aber kein PHP beherrsche, bekomme ich es einfach nicht hin.
Bin für jede Hilfe dankbar!
mfg. hdmadhead
Hier noch der komplette Code: PHP-Code: <?php get_header(); ?>
<div class="main_cent">
<div class="co_name_bg">
<div class="co_name">
</div>
</div>
<?php if(function_exists('featuredposts')) featuredposts(); ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="head_bg">
<div class="table2">
<div class="table_row2">
<div class="left2">
<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center" class="title_txt">
<tr>
<td style="padding:0px 0 0 11px;" class="post_div">
<div align="left"><span class="post_title"> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
<?php the_title(); ?>
</a></span></div>
</td>
</tr>
<tr>
<td valign="top">
<!-- links -->
<div class="links">
<div class="clock">
<?php the_time('F jS, Y') ?>
</div>
<div class="cat"> Filed under:
<?php the_category(', ') ?>
</div>
<div class="comment">
<?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?>
</div>
</div>
<!-- end links -->
</td>
</tr>
<tr>
<td height="0" valign="top" class="content_txt">
<?php the_content('Read the rest of this entry »'); ?>
<div class="post_tags">
<?php the_tags(); ?>
<?php endwhile; endif; ?>
<?php if (is_front_page()) { ?>
<ul>
<h2><span style="color: #000080;">Die neusten 5 Artikel:</span></h2>
<?php
$lastposts = get_posts('showposts=5');
foreach($lastposts as $post) :
setup_postdata($post);
?>
<li><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title('', ''); ?></a></li>
<?php the_excerpt(); ?>
<?php endforeach; ?>
</ul>
</div>
</td>
</tr>
<tr>
<td height="0" valign="top" class="post_bottom"> </td>
</tr>
</table>
<div class="comment">
</div>
</div>
<div class="right2">
</div>
</div>
</div>
</div>
<?php endwhile; ?>
<?php else : ?>
<div class="content_txt" style="padding:13px 10px 10px 3px; line-height:1.31em ">
<h2>Not Found</h2><br/>
<p class="center">Sorry, but you are looking for something that isn't here.</p><br/>
</div>
<?php endif; ?>
<?php if (function_exists('wp_pagenavi')) : ?>
<?php wp_pagenavi(); ?>
<?php else : ?>
<?php next_posts_link('« Older Entries'); ?>
<?php previous_posts_link('Newer Entries »'); ?>
<?php endif; ?>
</div>
<?php include (TEMPLATEPATH . "/sidebar.php"); ?>
<div class="right_1"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/spacer.gif" alt="" align="top" style="width:1px; height:1px"/></div>
</div>
</div>
<?php get_footer(); ?>
</div>
</div></div>
</body>
</html> |
| |