Vorschau Bilder zu Artikel
Hallo! Ich habe die vorherigen Einträge gelesen, aber ich werd nicht schlau daraus. Ich habe wordpress seit einer Woche im Einsatz. Auf der Startseite sind Kurzbeschreibungen zu den Artikeln. Daneben erscheint nur eine "no-thumb" grafik. In der Artikeln habe ich Bilder (bzw. Galerie) eingebunden. Daraus soll ein Vorschaubild auf der Startseite neben der Kurzbeschreibung erscheinen. Könnt Ihr mir bitte auf die Sprünge helfen, wie ich das umsetze. Folgend die Code Auszüge aus meinem Theme.
single.php
<div class="post-content">
<?php the_content('(continue reading...)');?>
</div>
<div class="clear"></div>
<div class="post-bottom">
Tags : <?php the_tags('', ', ', ''); ?> //
<small><?php edit_post_link('Edit this entry?','',''); ?></small>
</div>
index.php
<div class="post-wrapper">
<div class="title">
<h2><a href="<?php the_permalink() ?>"><?php the_title();?></a></h2>
</div>
<div class="meta">
By <?php the_author_posts_link(); ?> on <?php the_time('F m, Y') ?>//
<?php the_category(', '); ?> //
<?php comments_popup_link('Leave a Comment', '1 Comment', '% Comments'); ?> //
<a href="<?php the_permalink() ?>">Read more...</a>
</div>
<div class="post-content">
<?php if (get_post_meta($post->ID, "thumb", $single = true)) : ?>
<img src="<?php bloginfo('template_directory');?>/scripts/timthumb.php?src=<?php echo get_post_meta($post->ID, "thumb", $single = true); ?>&h=80&w=120&zc=1" alt="<?php the_title(); ?>" />
<?php else : ?>
<img src="<?php bloginfo('template_directory');?>/images/no-thumb.png" alt="<?php the_title(); ?>" />
<?php endif;?>
<?php the_excerpt();?>
</div>
<div class="clear"></div>
</div>
Alles anzeigen