WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Twelve
excerpt blog index and category index? (15 posts)

  1. bojan85
    Member
    Posted 1 year ago #

    Is there a way to make twenty twelve change to just show a excerpt on the blog index? Been stuck on the content.php for a while now..help would be much appreciated.

  2. bojan85
    Member
    Posted 1 year ago #

    Anyone know how accomplish this I have been stuck on it a couple days any help would much appreciated. So what i'm trying to do is have the blog home page show excerpt of the post instead of the full post.

  3. Tomas Mackevicius
    Member
    Posted 1 year ago #

    Usually if Settings/Reading/For each article in a feed, show: is checked to: Summary; and excerpt is present it would use excerpt automatically.

  4. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    No. That particular setting only affects the RSS feed - not the site display. First you would need to create a child theme for your changes, then edit a the child's copy of index.php to create a new Loop.

  5. Tomas Mackevicius
    Member
    Posted 1 year ago #

    Then in the content.php we could change from:

    <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 -->

    to

    <div class="entry-summary">
    	<?php the_excerpt(); ?>
    </div><!-- .entry-summary -->
  6. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    as content.php is also used for single posts, that change would never allow to show the full post;

    rather manipulate the conditional statement (which is used to already show excerpts in search result pages) to include the index pages;

    change:

    <?php if ( is_search() ) : // Only display Excerpts for Search ?>

    to:

    <?php if ( is_search() || is_home() ) : // Only display Excerpts for Search and Index ?>

    if you want to show excerpts in the category archive as well (as your topic title suggests ?) you also need to integrate is_category() ...

  7. Tomas Mackevicius
    Member
    Posted 1 year ago #

    True, my bad, Twenty Twelve doesn't have the content-single.php by default.

  8. bojan85
    Member
    Posted 1 year ago #

    Thanks everyone and alchymyth for the solution!

  9. ricardouk
    Member
    Posted 1 year ago #

    Hi everyone!

    been trying to mod my website with a 2012 child theme, i applied the "fix" by alchymyth so that i could show thumbnails+ excerpt on index page, it works but i noticed that when loading the index page both the thumbnails 100x100 and post images are being loaded, i only wanted the 100x100 thumbs to be viewed on index page so can anyone help me solving this puzzle? I dont know why images that are only meant to be showed on single post pages are being loaded in the background?

    I used firebug to "see" what gets loaded when a user visits the index page.

    here's my url:
    http://www.ricardouk.com

  10. Andrew Nevins
    Spam zapper & Volunteer Moderator
    Posted 1 year ago #

    As you're not contributing to the original poster, consider posting your own thread on your own issue.

  11. ricardouk
    Member
    Posted 1 year ago #

    Thanks...will do

  12. rmvalues
    Member
    Posted 1 year ago #

    Why don't you consider in using 'More Tag' when you write/edit a post?

    Then it will automatic show up excerpt in your category/index/archieve without modify the theme file which may get lost after an update.

  13. zerkaloolakrez
    Member
    Posted 1 year ago #

    thank you, angels!

  14. mossbit
    Member
    Posted 1 year ago #

    Great Post thank you all and alchymyth for the solution!

  15. ilmattiapascal
    Member
    Posted 1 year ago #

    thank you, this could be the real solution for people who wants excerpts on the index page on twentytwelve :)

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.