WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Eleven
featured posts full length?? (10 posts)

  1. zerocrew
    Member
    Posted 2 years ago #

    Hey everyone, I imagine this is pretty easy but I just can't find the answer out there anywhere :)

    I've got all my posts showing as excerpts but i want the featured post to remain full length. anyone know how to achieve this?
    thanks!

    http://wordpress.org/extend/themes/twentyeleven/

  2. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    Do not edit the Twenty Eleven theme. It is the default WordPress theme and having access to an unedited version of the theme is vital when dealing with a range of site issues. Create a child theme for your changes.

  3. zerocrew
    Member
    Posted 2 years ago #

    Thanks Esmi I should have mentioned I already have the child theme in place :)

  4. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    You would need to add a simple PHP counter variable that is incremented in the Loop and then conditionally use the_content() or the_excerpt() based on that counter's value.

  5. zerocrew
    Member
    Posted 2 years ago #

    OK sorry but im more of front en designer with little php experience... In other words I need you to spell it out a bit more for me than that :) haha!

  6. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    I've got all my posts showing as excerpts but i want the featured post to remain full length

    which template have you edited for that?

    are you talking about the 'showcase.php' template?

  7. zerocrew
    Member
    Posted 2 years ago #

    I edited the Content.php file, the code looks like this.

    line 40:

    <div class="entry-content">
            <?php the_post_thumbnail('twentyeleven-thumbnail-feature'); ?>
            <?php the_excerpt(); ?>
    			<?php //the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?>
    			<?php //wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
    		</div><!-- .entry-content -->

    [Please post code or markup snippets between backticks or use the code button.]

  8. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    That's not the right template. If this is for your main posts page, you need to creating a customised version of index.php in your child theme.

  9. zerocrew
    Member
    Posted 2 years ago #

    ok,
    can someone explain what the code should say?

  10. GnosticGirl
    Member
    Posted 1 year ago #

    Did you get an answer to this? I would like to do the same thing and am using a child-plan of Twenty Eleven also.

    I'm confused, should we make the change in the showcase.php file or the index.php file of our child-plan, and what change should we make?

    Can anyone help? Thanks.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic