• Hello David
    I want to customize the “Read More” button like the image below.
    Read More.png
    Thank you in advance…

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi there,

    add this PHP snippet to your site to change the Read More label:

    add_filter( 'generate_content_more_link_output','tu_change_content_more_link' );
    function tu_change_content_more_link() {
        return sprintf( '<p class="read-more-container"><a title="%1$s" class="read-more content-read-more" href="%2$s">%3$s</a></p>',
            the_title_attribute( 'echo=0' ),
            esc_url( get_permalink( get_the_ID() ) . apply_filters( 'generate_more_jump','#more-' . get_the_ID() ) ),
            __( 'Continue reading...', 'generatepress' )
        );
    }
    Thread Starter Shivam Pandey

    (@wikihelp360)

    Hey David, I think you have not understood my issue properly. I only want to change the width of the Read More box using CSS code like the image below.
    css.png

    Leo

    (@leohsiang)

    Give this CSS a shot:

    a.read-more.button {
        width: 100%;
        text-align: center;
    }

    Adding CSS: https://docs.generatepress.com/article/adding-css/

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Customizing Read More Button in GeneratePress’ is closed to new replies.