• Resolved wordsinthebucket

    (@wordsinthebucket)


    Hello everyone.

    I read a lot of topics about this issue but my ignorance do not let me to understand hot to solve it.

    I get that I have to put this <?php the_author_posts_link(); ?> , but I just don’t know where.

    Thank you in advance and sorry if this question looks very stupid to most of you.

Viewing 6 replies - 1 through 6 (of 6 total)
  • It depends on where you are trying to achieve this. What is your end goal? To have this on your home page, footer, side bar, etc?

    Thread Starter wordsinthebucket

    (@wordsinthebucket)

    Thank you for your reply and sorry for not being more specific.

    My goal is to let the readers click on the name of the author of a post and see all the posts (articles) written by the same author.

    To be clear here it is an example of a post of my blog:
    https://wordsinthebucket.com/diplomacy-in-the-age-of-social-media

    As you can see the name of the author, or his avatar, is not “active”.

    Hoping to have cleared it, thank you again.

    So your issue isn’t in how to get it linked across then, as you are already linking to the author’s posts. Your issue is when you get to that page it’s only showing “Posts By: (Blank)” Obviously (Blank) is just meant to say there is nothing after. Is that correct? If so then there looks to be an issue with your author.php file. It is not pulling the author name. To do so you need to have something like:

    <header class="page-header">
       <h1 class="page-title author"><?php printf( __( 'Author Archives: <span class="vcard">%s</span>', 'themename' ), "<a class='url fn n' href='" . get_author_posts_url( get_the_author_meta( 'ID' ) ) . "' title='" . esc_attr( get_the_author() ) . "' rel='me'>" . get_the_author() . "</a>" ); ?></h1>
    </header>

    Inside the loop of your template file.

    Thread Starter wordsinthebucket

    (@wordsinthebucket)

    Actually it is pulling the author’s name, as you can see from the example.
    The problem is that the author’s name is not clickable. In other words I would like the users to click on the author’s name (or avatar, or both) and get the list of the posts of that author.

    By “template file” you mean the Single Post (single.php) right?

    When I click on Marcus’s name I get brought to all of his articles so I’m not sure what you are talking about.

    Thread Starter wordsinthebucket

    (@wordsinthebucket)

    I am sorry. I meant the one at the end of the post. Anyway I solved this issue by inserting the URL related to the author’s posts (*.com/author/nicknameoftheauthor) in the users’ control panel in the section “website”.
    Thank you so much for your help and patience.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘List all posts by an author’ is closed to new replies.