WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Ten - replace "Continue reading" with custom text (5 posts)

  1. mmjaeger
    Member
    Posted 3 years ago #

    Hello
    I have been trying to replace "Continue reading" in excerpts with some custom text using some function in my child theme - however, I'm not getting anywhere - I'd appreciate if somebody would have some piece of code that would work in my child's theme functions.php file.

    Thank you in advance for your help.

  2. Tara
    Member
    Posted 3 years ago #

    review this codex guide and see if it helps: http://codex.wordpress.org/Customizing_the_Read_More

  3. mmjaeger
    Member
    Posted 3 years ago #

    I didn't review the codex - unfortunately it didn't help at all as all the examples I tried didn't work when put into the child's them functions.php

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

  5. mmjaeger
    Member
    Posted 3 years ago #

    found meanwhile the following piece of code that works as well:

    function change_excerpt_more(){
    	   function new_excerpt_more( $more ) {
    	        return '<span class="read-more"> <a href="'. get_permalink($post->ID) . '">Read more</a> </span>';
    	   }
    	   add_filter('excerpt_more', 'new_excerpt_more');
    	}
    	add_action( 'after_setup_theme', 'change_excerpt_more' );

    Thanks for your help guys

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.