[Support request] Read More Button

Home Forums Support Read More Button

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1106200
    ARCWP

    Hi,
    I want the “Read More” Button to open in a new window.
    Additional CSS?
    Thanks

    #1106234
    Leo
    Staff
    Customer Support

    Hi there,

    Try this PHP snippet:

    add_filter( 'generate_excerpt_more_output', function() {
        return sprintf( ' ... <a title="%1$s" class="read-more" href="%2$s" target="_blank">%3$s %4$s</a>',
    			the_title_attribute( 'echo=0' ),
    			esc_url( get_permalink( get_the_ID() ) ),
    			__( 'Read more', 'generatepress' ),
    			'<span class="screen-reader-text">' . get_the_title() . '</span>'
        );
    } );

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

    Let me know if this helps 🙂

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.