Ich möchte das erste Bild aus einem Post automatisch in einen besonderen Artikel einfügen, sollte der Post kein Bild enthalten, wird auch kein Bild abgebildet. Ich surfe und surfe und kann nichts finden. Könnt ihr mir vielleicht helfen? Anbei der Code:
Code:
<div id="featured">
<h2><?php the_category(', '); ?><i> - <?php the_time('d.m.Y'); ?> - <a href="<?php the_permalink() ?>#commenting" title="Jump to the comments"><?php comments_number('0 Kommentare','1 Kommentar','% Kommentare'); ?></a></i></h2>
<h1><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1>
<br />
<img src="<?php "Erstes Bild aus dem Post wenn vorhanden" ?>" alt="<?php the_title(); ?>" />
<?php the_content_limit(800, "Weiter lesen »"); ?>
<div class="clear"></div>
</div>