Site logo

Archived topic

Change "Read more" in custom post types

3 replies · Started by caleidoscopic on September 14, 2018

Viewing posts 1–4 of 4

Hi!
I'd like to change "Read more" text in custom post types

Hi there,

You can use this filter:
https://docs.generatepress.com/article/option_generate_blog_settings/

So the code should be something like this:

add_filter( 'option_generate_blog_settings', 'lh_cpt_readmore_label' );
function lh_cpt_readmore_label( $options ) {
    if ( is_post_type_archive( 'CPT_name' ) ) {
	$options['read_more'] = 'My custom read more label';
    }
  
    return $options;
}

Adding PHP: https://docs.generatepress.com/article/adding-php/

Let me know if this helps :)

Perfect! Thanks!

No problem :)

This archived topic is closed to new replies.