• I created a file /wp-content/themes/newtheme/blog.php that has the following code below. It appears to return the ‘Post’ data but it’s spitting the full post, I was expecting partial since I have the following which works on a different page:

    <?php the_content( __( ‘Continue reading <span class=”meta-nav”>→</span>’, ‘twentytwelve’ ) ); ?>

    Any ideas why it’s not working on this page?

    <?php
    	get_header();
    ?>
    <div id="content" role="main">
    <?php query_posts('showposts=10'); ?>
    <?php if ( have_posts() ) :
    	while ( have_posts() ) :
    		the_post(); ?>
    <div class="entry-content">
                <a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a>
                <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentytwelve' ) ); ?>
            </div><!-- entry-content -->
    
    		<footer class="entry-meta">
    			<?php twentytwelve_entry_meta(); ?>
    			<?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
    			<?php if ( is_singular() && get_the_author_meta( 'description' ) && is_multi_author() ) : // If a user has filled out their description and this is a multi-author blog, show a bio on their entries. ?>
    				<div class="author-info">
    					<div class="author-avatar">
    						<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentytwelve_author_bio_avatar_size', 68 ) ); ?>
    					</div><!-- .author-avatar -->
    					<div class="author-description">
    						<h2><?php printf( __( 'About %s', 'twentytwelve' ), get_the_author() ); ?></h2>
    						<p><?php the_author_meta( 'description' ); ?></p>
    						<div class="author-link">
    							<a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
    								<?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentytwelve' ), get_the_author() ); ?>
    							</a>
    						</div><!-- .author-link	-->
    					</div><!-- .author-description -->
    				</div><!-- .author-info -->
    			<?php endif; ?>
    		</footer><!-- .entry-meta -->
            <br />
            <hr />
    <?php endwhile;
    	else: ?>
    		<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif; ?>
    </div>
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
  • The topic ‘blog.php show 'Posts' pages with 'Continue reading' link’ is closed to new replies.