Dear Sir/Madam,
I have a Query-loop at the home page, I want to change the Read More to custom text, I refer to this article https://generatepress.com/forums/topic/customizing-the-read-more-text-on-all-archive-pages/, below is the code I added to functions.php but none of them work. Could you please advise which filter I should change?
function modify_read_more_link() {
return '<a class="more-link" href="' . get_permalink() . '">Continue ...</a>';
}
add_filter( 'the_content_more_link', 'modify_read_more_link' );
function new_excerpt_more($more) {
global $post;
return '<a class="moretag"
href="'. get_permalink($post->ID) . '">Continue ...</a>';
}
add_filter('excerpt_more', 'new_excerpt_more');
function excerpt_read_more_link($output) {
global $post;
$text = 'Continue ...';
return $output . '<a class="more-link" href="'. get_permalink($post->ID) . '">'. $text .'</a>';
}
add_filter('the_excerpt', 'excerpt_read_more_link');