Home › Forums › Back End › the_excerpt › Reply To: the_excerpt
This is my complete template, Sorry to repeat myself, Date and Title display different for each, the excerpt is the text from the homepage which this template is used on, not the text form the posts.
`
<?php
/*
Template Name: Homepage
*/
get_header(); ?>
<?php $debut = 0; //The first article to be displayed ?>
<?php while(have_posts()) : the_post(); ?>
<h2><?php the_title(); ?></h2>
<ul>
<?php
$myposts = get_posts(‘numberposts=-1&offset=$debut’);
foreach($myposts as $post) :
?>
<li><?php the_time(‘d/m/y’) ?>: <a href=”<?php the_permalink(); ?>”>
<?php the_title(); ?></a><?php the_excerpt(); ?></li>
<?php endforeach; ?>
</ul>
<?php endwhile; ?>
<?php get_footer(); ?>
`