• nealumphred

    (@nealumphred)


    I am using GP Premium 2.5.0. In Cuxtomizer > Layout > Blog, I have clicked “Display post author.”

    My name on each article on my blog’s homepage has a link that leads back to my blog’s homepage.

    Is there a way to change that link to lead to an About Me page?.

Viewing 6 replies - 1 through 6 (of 6 total)
  • ying

    (@yingscarlett)

    Hi there,

    This is not default behaviour, the author name should be linked to your author archive page, I think your SEO plugin has redirect it back to homepage.

    In this case, please check with your SEO plugin’s support on how to redirect author archive link to the about me page.

    And please open support topic in GP’s premium support forum in the future if the question is related to GP Premium plugin. We are not allowed to answer questions related to the premium plugin per WP’s regulation. Thanks for your understanding!

    Thread Starter nealumphred

    (@nealumphred)

    YING

    Thank you for the prompt response!

    I will check with my SEO plugin’s support staff.

    And I will go to GP’s premium support forum in the future.

    NEAL

    PS: Happy Thanksgiving …

    Thread Starter nealumphred

    (@nealumphred)

    YING

    I contacted my SEO plugin (RankMath) and they said: “The Display Post Author option of your theme shows the Author Name and links to the default WordPress author archives. If you want to change that URL, you will have to get in touch with your theme’s support, as they add the URL to the author name. Our plugin only controls if the author archives are enabled or not.”

    What next?

    NEAL

    Alvind

    (@alvindcaesar)

    Hi there,

    Try adding this snippet:

    add_filter( 'generate_post_author_output', function() {
    printf( ' <span class="byline">%1$s</span>',
    sprintf( '<span class="author vcard" %5$s><a class="url fn n" href="https://yoursite.com/about/" title="%3$s" rel="author" itemprop="url"><span class="author-name" itemprop="name">%4$s</span></a></span>',
    apply_filters( 'generate_inside_post_meta_item_output', '', 'author' ),
    esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
    esc_attr( sprintf( __( 'View all posts by %s', 'generatepress' ), get_the_author() ) ),
    esc_html( get_the_author() ),
    generate_get_microdata( 'post-author' )
    )
    );
    } );

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

    Replace the https://yoursite.com/about/URL in the snippet with your actual About page URL.

    Let us know if that works!

    Thread Starter nealumphred

    (@nealumphred)

    ALVIND

    That worked!

    Thanks.

    NEAL

    Alvind

    (@alvindcaesar)

    You’re welcome, Neal!

Viewing 6 replies - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.