Forums

[resolved] "Continue reading-->" in theme2010 (9 posts)

  1. fiatweb
    Member
    Posted 1 year ago #

    Hi, A small issue with the new 2010 theme: How to rid of the "Continue reading-->" at the end of an excerpt in the new 2010 theme? (all excerpts I set up already have "Read more..." at the end!)

    Thanks for help.

  2. MAS
    Member
    Posted 1 year ago #

    can you give your index.php file

  3. fiatweb
    Member
    Posted 1 year ago #

    Here is the theme's index.php:

    <?php
    get_header(); ?>

    <div id="container">
    <div id="content" role="main">

    <?php
    /* Run the loop to output the posts.
    * If you want to overload this in a child theme then include a file
    * called loop-index.php and that will be used instead.
    */
    get_template_part( 'loop', 'index' );
    ?>
    </div><!-- #content -->
    </div><!-- #container -->

    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

  4. MAS
    Member
    Posted 1 year ago #

    your all posts are coming from get_template_part( 'loop', 'index' ); funtion. Remove the "Continue reading-->" text from <?php the_exceprt() ?>

  5. fiatweb
    Member
    Posted 1 year ago #

    Thanks, chinmoy. Can you further deliberate: Remove the "Continue reading-->" text from which file or template? Where can I find that file/template? p.s. the index.php is the Main index template of the 2010 theme.

  6. fiatweb
    Member
    Posted 1 year ago #

    Ok, I solve the problem: go to the template (functions.php) and delete (or mark out) a function called "twentyten-custom-excerpts-more()

  7. syoungb
    Member
    Posted 1 year ago #

    @fiatweb I have the reverse problem. I would like my entire post to be included on the category page. Is there a way to stop the theme from chopping off the post?

  8. syoungb
    Member
    Posted 1 year ago #

    I have instead shortened the excerpt length in twenty-ten them functions.php page so that "Continue..." will show up after 10 characters and thus be on all pages in the category instead of just some. I also added text to the category.php to instruct readers to click on page title to see complete listing (as my readers would possibly know this intuitively). My question is there a chance these changes will be overwritten when run upgrades? I'm using the default 'twenty-ten" theme that comes with 3.0 WordPress. Do I need to rename the theme to protect my changes?

  9. leewutzke
    Member
    Posted 1 year ago #

    Here you can see that I changed Excerpt in the 2010 Function PHP from 40 to 900. That removed the Continue Reading Link because I don't have any posts over 900 words. I tried the other ideas posted here but they did not work for me. Here is how it looks:

    function twentyten_excerpt_length( $length ) {
    return 900;
    }
    add_filter( 'excerpt_length', 'twentyten_excerpt_length' );

    /**
    * Returns a "Continue Reading" link for excerpts

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.