Hallo,
ich wollte auf einer Seite Posts recht individuell mit ner speziellen Listenlösung darstellen. Aber mit "post_thumbnail" in den <li>s scheint was nicht zu funktionieren. Nachfolgend der Code...es erscheint nur oben das allererst Thumbnail und das letzte...dabei ist der Code bei den <li>s immer per copy+paste derselbe. Aber vielleicht ist das von mir irgendwie falsch aufgebaut und funktioniert deshalb nicht?! (Featured Images sind von mir im Backend natürlich bei allen angegeben):
PHP
<div>
<div class="main-txt">
<?php query_posts('p=1'); ?>
<?php while (have_posts()) : the_post(); ?>
<h4><?php the_title(); ?></h4>
<?php the_content(); ?>
</div>
<div class="main-img">
<?php the_post_thumbnail(); ?>
<?php endwhile;?>
</div><!-- .main -->
<ul class="sub">
<li>
<?php query_posts('p=2'); ?>
<?php while (have_posts()) : the_post(); ?>
<?php the_post_thumbnail(); ?>
<h4><?php the_title(); ?></h4>
<?php the_content(); ?>
<?php endwhile;?>
</li>
<li>
<?php query_posts('p=3'); ?>
<?php while (have_posts()) : the_post(); ?>
<?php the_post_thumbnail(); ?>
<h4><?php the_title(); ?></h4>
<?php the_content(); ?>
<?php endwhile;?>
</li>
<li>
<?php query_posts('p=4'); ?>
<?php while (have_posts()) : the_post(); ?>
<?php the_post_thumbnail(); ?>
<h4><?php the_title(); ?></h4>
<?php the_content(); ?>
<?php endwhile;?>
</li>
<li>
<?php query_posts('p=5'); ?>
<?php while (have_posts()) : the_post(); ?>
<?php the_post_thumbnail(); ?>
<h4><?php the_title(); ?></h4>
<?php the_content(); ?>
<?php endwhile;?>
</li>
</ul> <!-- .sub -->
</div>
Alles anzeigen
Was muss ich umtippen, damit's läuft?