unfortunately, you haven’t posted your edited code;
this is the section in content.php of Twenty Twelve:
<?php if ( is_search() ) : // Only display Excerpts for Search ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<?php else : ?>
<div class="entry-content">
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentytwelve' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'twentytwelve' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php endif; ?>
this is the line that would need chnaging:
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentytwelve' ) ); ?>
alternatively, you could make the changes by edting the conditional statement; from:
<?php if ( is_search() ) : // Only display Excerpts for Search ?>
to:
<?php if ( is_search() || is_home() || is_archive() ) : // Only display Excerpts for Search, Posts Page, Archives ?>
http://codex.wordpress.org/Conditional_Tags
make sure to save the file after the changes;
make sure to edit the copy of content.php in your child theme …
Twentytwelve has many different post formats. All the template files that start with content- are used to display posts of different formats.
You don’t need to change any code to use excerpts with Twentytwelve though. Just insert <!--more-->
in the page where you want the page to break in two parts and only the part before that code will be displayed in the blog.
Thread Starter
mrling
(@mrling)
@alchymth:
The directions that you suggestion are exactly what I tried that did not work, with the exception of the alternative technique which I will try soon. Also, maybe It would make a difference that I was trying to make these changes on my localhost with WAMP server? I don’t know why it would be this though, since everything seems to be running fine (pages and links work)
@dotnordic:
I was considering using the <!–more–> tag, but don’t want to do this with every single post, so that is why I am trying to edit the code.