I'm trying to get my authors blog post byline content to link to their archive page of posts. I've got everything working, but would rather the author post link be:

http://example.com/author/firstname-lastname/ instead of http://example.com/author/user_id/

Basically using their display name for the url.

Is that possible?

The current code I have for my byline is:

    printf( __( 'Originally Posted: <time itemprop="datePublished" datetime="%1$s" pubdate>%2$s</time> by <span class="author" itemprop="author"><a href="%3$s" title="Posts by %4$s">%4$s</a></span>', 'ea_theme' ),
    get_author_posts_url( get_the_author_meta( 'ID' )),
    get_the_author_meta( 'display_name' ) );
  • Check out this question; the accepted answer might have what you need, or at least get you started in the right direction. Or if you'd prefer a plugin, check out Edit Author Slug (I have no affiliation).
    – Gabriel
    Jan 17 '15 at 8:56
  • Thanks @Gabriel! The plugin I posted below works great. And works with 4.1
    – tigre
    Jan 17 '15 at 16:35

This plugin does the job nicely: https://wordpress.org/plugins/display-name-author-permalink/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.