Viewing 11 replies - 16 through 26 (of 26 total)
  • Thread Starter zeaks

    (@zeaks)

    It removes the “continue reading” text….editing this, it adds “can you hear me now” I didn’t notice it at first look

    Did you un-comment the bit we commented out earlier?

    Thread Starter zeaks

    (@zeaks)

    Yes it’s un-commented now, and still showing the “can you hear me now” part

    Well, you can change:

    'Can you hear me now?'

    To:

    ''

    Then, we just need to figure out why excerpt_more is interfering with read_more.

    Thread Starter zeaks

    (@zeaks)

    It seems to work the same with the new child theme I made with nothing in the functions.php besides the code you posted above. If I remove the “can you hear me now” part , it doesn’t show any “continue reading” text either
    You can see it here https://test.zeaks.org/

    Nothing else is in the functions file

    What do you want the “Read More” link to say, exactly? Will this work?

    function change_excerpt_more(){
       function new_excerpt_more($more) {
            return '[Read More]';
       }
       add_filter('excerpt_more', 'new_excerpt_more');
    }
    add_action( 'after_setup_theme', 'change_excerpt_more' );

    Thread Starter zeaks

    (@zeaks)

    Well I want it to be linked. I just wanted to remove the … part of the line so instead of saying

    post summary … Continue Reading ->
    it would say
    post summary Continue Reading ->

    But have the continue reading text hyperlinked, it’s just plain text now.

    You want it to be linked on the Excerpt, or just with the More Tag?

    I think the disconnect here might be that you don’t actually want to modify the excerpt, but rather the Read More link.

    If so, forget everything we’ve done so far, and try this. Inside your Loop, replace your call to:

    <?php the_content(); ?>

    with this:

    <?php the_content( '<span class="read-more">Read More <span class="meta-nav">&raquo;</span></span>' ); ?>

    Thread Starter zeaks

    (@zeaks)

    I just wanted to get rid of the … but what you posted earlier ended up working, I just had to link the “read the rest” text to the post. Here is what I have in my functions, I removed the original code I had to change the continue reading text and added

    /* remove the ... from excerpt and change the text*/
    function change_excerpt_more(){
       function new_excerpt_more($more) {
            return '<span class="read-more"><a href="'. get_permalink($post->ID) . '">Read the Rest ?</a></span>';
       }
       add_filter('excerpt_more', 'new_excerpt_more');
    }
    add_action( 'after_setup_theme', 'change_excerpt_more' );

    The read-more span class isn’t needed, but I wanted it to be placed on another line after the excerpt for one of my layouts and used display: block; to do so. https://test.zeaks.org

    Thanks alot for all the help, I’ve been trying to figure this out for a while.

    Awesome! Glad you got it working.

    (p.s. be sure to mark the topic “resolved”, to help others who might be looking to solve a similar issue.)

Viewing 11 replies - 16 through 26 (of 26 total)
  • The topic ‘Remove … from excerpt’ is closed to new replies.