Support » Fixing WordPress » theme is showing full articles and not summary on front page

  • Resolved Efwis


    hi all,
    Well it has been a while, but I have run into a new problem. I’m using the twenty-eleven theme and it shows the full post on the front page instead of just a summary.

    I have show summary checked in the WP options, I have tried using the excerpts box to just show the summary, but I still get the full posts rather then a summary of the article on the blogs front page. any ideas what i need to do to fix this?

    here is the site.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Okay… Once I tell you how to do this, about 37 people are going to jump on and tell you not to edit the twentyeleven theme, and that you should create a child theme for your modifications.

    And they would all be correct! 🙂

    If you modify the twentyeleven theme, you will loose all your changes when the theme is overwritten on your next WordPress update.

    That being said, I believe you can change the blog page to show just excerpts by opening content.php and on on line 41, change only this;

    <?php the_content

    to this;

    <?php the_excerpt

    …and save the changes. I think that might let you show your articles on the blog page as excerpts. Make sure you make backups before and after the changes. just in case something doesn’t work out.

    Also, look into this when you have some time: Child Themes.

    Using a child theme will allow you to take advantage of any updates to the parent theme, while not losing any of your customizations during an upgrade.

    thanks ClaytonJames,

    Now before anyone starts jumping in here and screaming don’t mess with the core codes, I already know the dangers of messing with Core codes, I had to do it with joomla while designing a site.

    that said, if you have some suggestions without screaming at me or ClaytonJames about messing with the core code I’m all ears, meanwhile I will look into the child themes thing.

    It’s not technically a WordPress core file you’re editing, it’s just the content.php file located in the twentyeleven theme.

    that said, if you have some suggestions without screaming at me or ClaytonJames about messing with the core code I’m all ears

    Haha! No worries! I was just attempting to be humorous (perhaps too over the top?) with that bit about the 37 people jumping in! 🙂 It’s pretty common knowledge, but everyone likes to remind folks about the perils of editing the default theme just the same. The instructions I gave you should probably work fine. Just back up the theme files after you make the changes so you have a copy saved locally.

    Upon looking at line 41 in the content.php the code was already set to that setting, before I even got to it. so that is not helping any. any other ideas?

    I’m still looking at that theme-child link you provided.

    The default on line 41 in /twentyeleven/content.php is:

    <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?>

    If it already says “the_excerpt”, someone has already modified it, and I can provide no explanation as to why it doesn’t work.

    I just tested it. I changed line 41 as previously mentioned and my blog page content changed from full articles to excerpts.

    Make sure you are looking at line 41 and not line 37.

    ok, I got it taken care of with that. I looked at the wrong line of code the first time.

    I will leave this hack in place until I get my child theme set up

    thanks again.

    You’re welcome.

    This worked out incredibly fine, thanks!

    I tried this (after backing up Content.php on my hard drive) and it works great!

    Interesting I’m using the twentytwelve theme and I did create a child theme and I can’t find the line the poster mensions to change. I found a similar line but it errored out on line 39 of the thing so I restored my back up. Help? Please. I want to also get excerpts and I have summary checked.



    Forum Moderator

    @marrie125: As per the Forum Welcome, please post your own topic. Posting in an existing topic prevents us from being able to track issues by topic. Added to which, your problem – despite any similarity in symptoms – is likely to be completely different.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘theme is showing full articles and not summary on front page’ is closed to new replies.