Viewing 4 replies - 1 through 4 (of 4 total)
  • add this function into functions.php of your child theme, and edit the text there:

    /**
     * Returns a "Continue Reading" link for excerpts
     */
    function twentyeleven_continue_reading_link() {
    	return ' <a href="'. esc_url( get_permalink() ) . '">' . __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) . '</a>';
    }
    // twentyeleven_continue_reading_link
    Thread Starter seangheng

    (@seangheng)

    hmm. it doesn’t work. This is my code

    <?php
    
    /** Tell WordPress to run post_theme_setup()
    * when the 'after_setup_theme' hook is run.
    */
    
    add_action( 'after_setup_theme', 'post_theme_setup' );
    
    if ( !function_exists( 'post_theme_setup' ));
    function post_theme_setup(){
    /**
     * Returns a "Continue Reading" link for excerpts
     */
    function twentyeleven_continue_reading_link() {
    	return ' <a href="'. esc_url( get_permalink() ) . '">' . __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) . '</a>';
    }
    
    }
    endif;

    this should be your code:

    /* Returns a different "Continue Reading" link for excerpts in child theme */
    function twentyeleven_continue_reading_link() {
    	return ' <a href="'. esc_url( get_permalink() ) . '">' . __( 'Another Word <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) . '</a>';
    }

    or alternative:

    /**
     * Returns a different "Continue Reading" link for excerpts in the child theme
     */
    function twentyeleven_continue_reading_link() {
    	return ' <a href="'. esc_url( get_permalink() ) . '">' . 'Another Word <span class="meta-nav">&rarr;</span>' . '</a>';
    }
    Thread Starter seangheng

    (@seangheng)

    Perfect! it works now. Thank you very much

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Change the word "Continue Reading"’ is closed to new replies.