Show post summary on blog page
-
I’ve been searching for how to have my blog page only show a summary of the full post and have the read more link to the full post. I was reading Alexis403’s post How do I show a summary of posts on the home page and… . Which at first, I thought was the answer to my particular problem.
So I -blindly- went ahead and opened up the editor under appearance and started editing my index.php. Funny thing is, my theme(Twenty Twelve) doesn’t have a the_content() function in it’s index.php file, but it did have this` <?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( ‘content’, get_post_format() ); ?>
<?php endwhile; ?>`So I replaced the, the_post() function with the_excerpt. Pretty cool, it kind of looked like a broke my blog page.
But I’m not that imprudent; any time I make changes to anything on my theme, I locally create a folder for it, and backup the original contents of the file I’m editing, and if anything breaks then I simply copy and paste the original code or if I like what I see I make “_modified” version of the file and save it in the same folder. I want to try to understand what I’m doing, so I figured it’s a good way to start.So after playing with the code a bit more, I realized a funny thing, my homepage is set to static: frontpage (About) and post (Blog). So the previous thread wouldn’t apply to me, and editing the index.php file wouldn’t change my blog page to the way I want it.
I kind of want to edit the content.php file to see if maybe there is something that relates to my blog(posts) page and maybe insert the_excerpt() in there. But I don’t know if this will affect my pages globally or if it even is the correct way of doing it.
I would appreciate any help on this matter, I really want to learn how to make these sort of changes manually. I have virtually zero experience with php in particular so pardon if I sound like a fool.
- The topic ‘Show post summary on blog page’ is closed to new replies.