WordPress.org

Support

Support » Themes and Templates » Portfolio Press » [Resolved] Show the excerpt, not the whole post

[Resolved] Show the excerpt, not the whole post

  • On my blogroll I don’t want the entire post to show. I simply want the excerpt to show.

    I have the latest version of WP and PP.

    I have “excerpt” selected in my Reading Settings, but that didn’t change anything.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Please note that Settings > Reading > ‘For each article in a feed, show’ that refers to feeds (RSS) only and has nothing to do with blog post.

    If you haven’t done so yet you need to create a Child_Themes and copy over the relevant template (most likely it is index.php or archive.php) then find

    the_content()

    and replace it with

    the_excerpt()

    http://codex.wordpress.org/Function_Reference/the_excerpt

    Thank you salsaturation. I probably should have known what the Setting > Reading > settings do. My bad.

    I do have a child theme, but I could not find

    the_content()

    in my index.php file.

    It says this:

    <?php
    /* Include the Post-Format-specific template for the content.
    * If you want to overload this in a child theme then include a file
    * called content-___.php (where ___ is the Post Format name) and that will be used instead. */
    get_template_part( 'content', get_post_format() );
    ?>

    sorry ignore index.php (delete it from the child theme if you havent edited it). Copy over content.php and edit line 45

    from

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

    to

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

    Okay that almost did the trick.

    But now the “featured image” isn’t displaying for posts. Only the title and excerpt show.

    Thank you for all your help so far.

    Not to question your expertise, but are you sure that -> isn’t supposed to be =>?

    Not to question your expertise, but are you sure that -> isn’t supposed to be =>?

    yes you are right – the editor here changed it. Actually all you needed to amend was replace the_content with the_excerpt the excerpt – everything else remained the same.

    Add <div class="featured-image"></class><?php the_post_thumbnail(); ?></div> to line 45 so your code will look like

    <div class="featured-image"></class><?php the_post_thumbnail(); ?></div><?php the_excerpt( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'portfoliopress' ) ); ?>

    the editor is playing up – so note that the only thing that has changed is

    <div class="featured-image"></class><?php the_post_thumbnail(); ?></div><?php the_excerpt

    Man you’ve been super helpful, dude. Thanks a lot!

    Last question I swear?

    The post thumbnail shows (thank you again), but it’s not clickable. Like the headline, I’d like the user to be able to click on the image and get to the post. Any way to make this happen?

    Theme Author Devin Price

    @downstairsdev

    Sorry I didn’t see this thread earlier. An easier option would probably be to use the “More Tag”: http://en.support.wordpress.com/splitting-content/more-tag/

    The post thumbnail shows (thank you again), but it’s not clickable. Like the headline, I’d like the user to be able to click on the image and get to the post. Any way to make this happen?

    This should work

    <a href="<?php the_permalink() ?>"><?php the_post_thumbnail(); ?></a>

    Worked like a charm salsaturation. Thank you for all your accurate help.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Resolved] Show the excerpt, not the whole post’ is closed to new replies.
Skip to toolbar