Page 1 of 1

Read More tag/global$more

PostPosted: Fri Dec 07, 2012 6:37 pm
by GFY
I'm trying to use the "read more" tag for a static Home page and have used the "$more global" variable. It displays the "read more" but doesn't display the rest of the content. Any help? Thanks!

Code: Select all
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<?php global $more; $more = 0; ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ( is_front_page() ) { ?>
<h2 class="entry-title"><?php the_title(); ?></h2>
<?php } else { ?>
<h1 class="entry-title"><?php the_title(); ?></h1>
<?php } ?>

<div class="entry-content">
<?php the_content('read more'); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'slidingdoor' ), 'after' => '</div>' ) ); ?>
<?php edit_post_link( __( 'Edit', 'slidingdoor' ), '<span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-content -->