• bojan85

    (@bojan85)


    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.

Viewing 14 replies - 1 through 14 (of 14 total)
  • Thread Starter bojan85

    (@bojan85)

    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.

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

    esmi

    (@esmi)

    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.

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

    (@alchymyth)

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

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

    Thread Starter bojan85

    (@bojan85)

    Thanks everyone and alchymyth for the solution!

    Ricardo

    (@ricardouk)

    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 100×100 and post images are being loaded, i only wanted the 100×100 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:
    https://www.ricardouk.com

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

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

    Ricardo

    (@ricardouk)

    Thanks…will do

    RMvalues

    (@rmvalues)

    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.

    thank you, angels!

    Great Post thank you all and alchymyth for the solution!

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

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘excerpt blog index and category index?’ is closed to new replies.