I have the following blog template with the the_content outputted. I have placed <!--more-->
However it does not appear to be functioning,
http://www.milknhny.co.uk/DVine/?page_id=19
Is there anything that needs to be included within functions for this to function?
Code Of my Blog Template
<?php
/*
Template Name: Blog Template
*/
?>
<?php get_header();?>
<?php echo get_the_post_thumbnail($post->ID, 'single-post-thumbnail'); ?>
<div id="maincontentwrap" role="main">
<?php query_posts('showposts=5'); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="datebackground"><span class="day"><?php echo get_the_date('j'); ?></span> <span class="month"><?php echo get_the_date('M'); ?></span></div>
<div class="postsh1"><?php echo get_the_title(); ?></div>
<div id="blogwrapper">
Written by <?php the_author_posts_link() ?> in <?php the_category(); ?>
<?php the_content('read more...'); ?>
<br>
<div class="pagedivider"></div>
</div>
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
</div><!-- #content -->
<?php get_footer(); ?>
EDIT
I have found this within the Twenty Twelve theme and ive tried to adapt this to my own however the – errors the actual code…
function DTheme_excerpt_length( $length ) {
return 40;
}
add_filter( 'excerpt_length', 'DTheme_excerpt_length' );
if ( ! function_exists( 'DTheme_continue_reading_link' ) ) :
/**
* Returns a "Continue Reading" link for excerpts
*
* @since Twenty Ten 1.0
* @return string "Continue Reading" link
*/
function DTheme_continue_reading_link() {
return ' <a href="'. get_permalink() . '">' . __( 'Continue reading <span class="meta- nav">→</span>', 'DTheme' ) . '</a>';
}
endif;
/**
* Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and twentyten_continue_reading_link().
*
* To override this in a child theme, remove the filter and add your own
* function tied to the excerpt_more filter hook.
*
* @since Twenty Ten 1.0
* @return string An ellipsis
*/
function DTheme_auto_excerpt_more( $more ) {
return ' …' . DTheme_continue_reading_link();
}
add_filter( 'excerpt_more', 'DTheme_auto_excerpt_more' );
?>
Is it a case i would need to adapt the above for this to work?
EDIT
Hi all, this appears to be part working after amazing help below, however it is still not displaying within the content wrap and also images for example are resizing… please see my code now and also screenshot
<?php get_header(); ?>
<div id="maincontentwrap" role="main">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="datebackground"><span class="day"><?php echo get_the_date('j'); ?></span> <span class="month"><?php echo get_the_date('M'); ?></span></div>
<div class="postsh1"><?php echo get_the_title(); ?></div>
<div id="blogwrapper">
Written by <?php the_author_posts_link() ?> in <?php the_category(); ?>
<?php the_content(); ?>
<br>
<div class="pagedivider"></div>
</div>
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
</div><!-- #content -->
<?php get_footer(); ?>