• Hi, I am making a theme based on _s theme. On the content-single.php, I am modifying the author bio’s box and this is what I am trying to achieve:

    This article was written by adminLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit

    Admin (not bold, just wanted to draw attention) should be clickable and take us to the admin template / post. I am using “get_the_author_link()” but the result is not clickable / not a link.

    Here is my code:

    <div class="author-description">
    						<p><?php printf( __( 'This article was written by ', 'my-theme' )); echo get_the_author_link(); ?><?php the_author_meta( 'description' ); ?></p>
    					</div><!-- .author-description -->

    What do I do wrong? Please help.

    Thanks in advance.

Viewing 1 replies (of 1 total)
  • Thread Starter cardan

    (@cardan)

    Now I am using “the_author_posts_link()” and admin appears at the beginning..

    adminThis article was written by Lorem ipsum

    The code:

    <p><?php printf( __( 'This article was written by ', 'my-theme' ), the_author_posts_link() );?><?php the_author_meta( 'description' ); ?></p>

    is a link though.. Previously when I used “get_the_author()”, “admin” appeared at the beginning and after “This article was written by” (yes, double!)

Viewing 1 replies (of 1 total)
  • The topic ‘get_the_author_link() is not Working’ is closed to new replies.