Support Forum

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Conditional 'Read More' text changes Reply To: Conditional 'Read More' text changes

#14997
Tom
Keymaster

Hi there,

Not sure if it will work, but you can try this:

add_filter( 'wpsp_read_more_output', function( $output ) {
    if ( ! has_tag( 'your-tag' ) ) {
        return $output;
    }

    return sprintf('<div class="wpsp-read-more"><a title="%1$s" class="%4$s" href="%2$s">%3$s</a></div>',
        the_title_attribute( 'echo=0' ),
        esc_url( get_permalink() ),
        'YOUR CUSTOM TEXT HERE',
        'wp-show-posts-read-more'
    );
} );