ndhelp
Member
Posted 6 months ago #
I set up a 2012 child theme. On my homepage, I just want excerpts and an image as a read more link. I changed <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentytwelve' ) ); ?> to <?php the_excerpt( __( 'Continue reading <span class="meta-nav">→</span>', 'twentytwelve' ) ); ?> but when you click on the post title it still only shows the excerpt and not the complete posts. How can I fix?
this is because content.php is used for index pages as well as for single posts;
try to use a conditional statement:
<?php if( is_home() ) the_excerpt();
else the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentytwelve' ) ); ?>
http://codex.wordpress.org/Function_Reference/is_home
ndhelp
Member
Posted 6 months ago #
Thank you alchymyth, that worked great. I noticed that instead of a read more link there's just [...] and no link. Is there a way to add a 'read more' link?
ndhelp
Member
Posted 6 months ago #