Support » Theme: Ascend » Getting rid of “read more” from excerpt

  • Resolved larsemerson

    (@larsemerson)


    Hi there — been trying to get rid of the “Read More” link at the end of each post shown on the home page (and archive pages). I stumbled on an old post that gave me this code:

    function custom_child_init() {
    remove_filter('excerpt_more', 'ascend_excerpt_more');
    remove_filter( 'get_the_excerpt', 'ascend_custom_excerpt_more' );
    }
    add_action( 'init', 'custom_child_init' );

    I have put that into my child theme’s functions — which got rid of the link, but now there’s a […] in its place. it’d be nice to have the trailing text end in a “…” as it did before but without the brackets. Any ideas?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • hannah

    (@hannahritner)

    Hey @larsemerson,
    Try using this function instead:

    function change_excerpt( $more ) {
         return '';
    }
    add_filter('excerpt_more', 'change_excerpt');

    Let me know how that works for you!

    Best,
    Hannah

    Thread Starter larsemerson

    (@larsemerson)

    That worked wonders, using both functions, thank you!

    hannah

    (@hannahritner)

    Happy to help!

    Best,
    Hannah

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Getting rid of “read more” from excerpt’ is closed to new replies.