In My WordPress blog I'm using Genesis framework with Modern Blog child theme. Now I am trying to add read more button on archive page. It is same as WordPress general Function.
I have found a code over internet but this is not work for me.
add_filter('excerpt_more', 'get_read_more_link');
add_filter( 'the_content_more_link', 'get_read_more_link' );
function get_read_more_link() {
return '...;<a href="' . get_permalink() . '">[Read More]</a>';
}
You should add this to your themes child functions.php
file:
// Read more link text
add_filter( 'excerpt_more', 'custom_read_more_link');
add_filter('get_the_content_more_link', 'custom_read_more_link');
add_filter('the_content_more_link', 'custom_read_more_link');
function custom_read_more_link() {
return ' <a class="more-link" href="' . get_permalink() . '" rel="nofollow">[Read More] …</a>';
}