code custom excerpt (ok)

//excerpt de hien thi link
function new_excerpt_length() {
        return 40;
    }
    
    add_filter('excerpt_length', 'new_excerpt_length');
    
function new_excerpt_more($more) {
        global $post;
        return "<a class='more-link' href='".get_permalink($post->ID)."'>Xem tiếp ...</a>";
    }
    
add_filter('excerpt_more', 'new_excerpt_more');

Last updated