WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Remove "Continue Reading" from TwentyTen (3 posts)

  1. sincewelastspoke
    Member
    Posted 3 years ago #

    Hi,

    I have the following code for looping through recent news entries in my site:

    <?php
            $my_query = new WP_Query('cat=1&limit=2&orderby=ID&order=ASC');
    				while ($my_query->have_posts()) : $my_query->the_post();
    				?>
    
             <!-- Display the Title as a link to the Post's permalink. -->
             <p class="title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p>
    
            <?php the_excerpt(); ?>
    
            <?php endwhile; ?>

    It works great.

    Except I can't seem to get rid of 'Continue reading →' at the end of my excerpts.

    The script sample above is from header.php

    Can anyone help me remove Continue Reading or at least change it to something else?

    Many thanks

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

    the code for this is in functions.php of TwentyTen (from line 235):

    /**
     * Returns a "Continue Reading" link for excerpts
     *
     * @since Twenty Ten 1.0
     * @return string "Continue Reading" link
     */
    function twentyten_continue_reading_link() {
    	return ' <a href="'. get_permalink() . '">' . __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) . '</a>';
    }
  3. sincewelastspoke
    Member
    Posted 3 years ago #

    Many many thanks!! Only just spotted the reply.

    Made the alt and it worked a dream. Thanks again

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.