<?php $lastposts = get_posts('numberposts=10'); foreach($lastposts as $post) : setup_postdata($post); ?> <li><a href="<?php the_permalink(); ?>"> <?php the_title(); ?></a></li> <?php global $more; $more = 0; the_content(''); ?> <?php endforeach; ?> |
<?php $lastposts = get_posts('numberposts=10'); foreach($lastposts as $post) : setup_postdata($post); ?> <li><a href="<?php the_permalink(); ?>"> <?php the_title(); ?></a></li> <?php global $more; $more = 0; the_content(''); ?> <?php endforeach; ?> |
<?php $lastposts = get_posts('numberposts=10'); foreach($lastposts as $post) : setup_postdata($post); ?> <li><a href="<?php the_permalink(); ?>"> <?php the_title(); ?></a></li> <?php global $more; $more = 0; the_content(''); ?> <?php endforeach; ?>
Hallo,
in welcher Datei ändert oder fügt man diesen Codeschnipsel hinzu?
Vielen Dank,
Gruß Tanja
Hi Tanja, der Code wird an der Stelle eingefügt, wo Beiträge ausgegeben werden sollen. Will man z.B. in der Sidebar die letzten x Beiträge anzeigen, dann fügt man den Code in der Datei sidebar.php ein…
Grüße, Nina