Hi
I was wondering how to add a custom ‘Read More’ text (as seen in blog/archive pages) for a specific category. I want to change the text from ‘Read More’ (for other categories) to something like ‘Learn’ for one specific category.
I tried the below code suggested by Leo here:
add_filter( 'option_generate_blog_settings', 'lh_custom_read_more_text' );
function lh_custom_read_more_text( $options ) {
if ( is_category( '9' ) ) {
$options['read_more'] = 'My custom read more label'
}
return $options;
}
I doesn’t work. I also tried to make my own with the help of documentation (this and this). But I am not able to get it right.
Any help would be much appreciated.
Thanks