Forums

[resolved] How to make sticky post to show full text in TwentyTen (4 posts)

  1. alexnjoy
    Member
    Posted 1 year ago #

    Hello,
    I'm using TwentyTen theme and I want to use sticky post as "About me" text on my home page, but the problem is that TwentyTen theme crops the post and showing only excerpt.

    How to make it to show full text (without "Continue reading" link) and without tags and category description in the bottom?

    Where I need to edit something or to put some codes?

    Thanks.

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

    Don't edit the Twenty Ten theme! Your changes will be over-written the next time you upgrade WordPress or the theme. For this reason, it is recommended that you consider creating a child theme for your customisations.

  3. alexnjoy
    Member
    Posted 1 year ago #

    Problem resolved by adding <!--more--> in the end of the post and by adding this code

    <?php /* Sticky post loop structure. */ ?>
        <?php if ( is_sticky() ) : ?>
            <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
                <h1><?php the_title(); ?></h1>
    				<?php the_content( __( '', 'twentyten' ) ); ?>
    				<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
                <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?>
    
            </div><!-- #post-## -->

    after this line in the loop.php
    <?php while ( have_posts() ) : the_post(); ?>
    and changing this line
    <?php if ( in_category( _x('gallery', 'gallery category slug', 'twentyten') ) ) : ?>
    to this one
    <?php elseif ( in_category( _x('gallery', 'gallery category slug', 'twentyten') ) ) : ?>

  4. alexnjoy
    Member
    Posted 1 year ago #

    To esmi:
    thanks for the tip!

Topic Closed

This topic has been closed to new replies.

About this Topic