• Resolved Erwin1974

    (@erwin1974)


    How would I go about making a link to all posts by an author in the plugin?

    I would like the “about the author” be the posts by author link, or have the link to the left of the social buttons if possible.

    To be clear, I’m talking about the function: <?php the_author_posts_link(); ?>

    I’m afraid my knowledge of php is limited, so I’m not sure how to enable such a function in your plugin.

    Thanks for your reply!

    http://wordpress.org/extend/plugins/author-box-2/

Viewing 5 replies - 1 through 5 (of 5 total)
  • I would really, really like to know how to do this too. Spent about four hours this morning trying to do it myself, but I have no idea what I’m doing!

    If anyone has the code, please let me know!

    Hi there 🙂

    Sorry for the delay in replying.

    I don’t use it on my plugin but you can check more info and samples of its use at http://hitchhackerguide.com/2011/02/12/the_author_posts_link/

    If you are going to fiddle with the code I would strongly advise on buying a book on WordPress. Check at https://wordpress.org/about/books/

    Hope it helps.

    1
    Lopo

    Have you tried entering the link to the authors archive page in the website section of the author’s profile? Seems to me that would work 😉

    Thread Starter Erwin1974

    (@erwin1974)

    @lopo Thx for the link, really helpful!

    @rene, there is already a link to the author’s profile, but it needs to be integrated with this plugin as well. Right now it is only a half solution. Thx for the idea though 🙂

    Sorry for the delay. I was not getting any warning messages from the system.

    Another solution would be to copy any of the plugin “packs” to a new one called authorposts.php. Change the portion Section to modify to:

    function authorposts_authorbox_add_sites( $known_sites ) {
       $author_posts_url = get_author_posts_url(get_the_author_meta( 'ID' ));
       $known_sites['Author Posts'] = array(
        'favicon' => plugin_dir_url( __FILE__ ) . 'images/authorposts.png',
        'url' => $author_posts_url,
        'plugin' => array (
          'author' => 'Lopo Lencastre de Almeida <dev@ipublicis.com>',
          'url' => 'http://ipublicis.com/',
          'donate' => 'http://smsh.me/7kit',
         ),
       );
       return $known_sites;
    }
    add_filter('authorbox_known_sites','authorposts_authorbox_add_sites',10,1);

    Upload the files (php and png) to the proper directory and activate it. That’s it. Ah! Don’t forget to create the image 😉

    NOTE #1: On the user’s profile page at Contact Info you’ll have a place asking for “Author Posts” and a text box in front of it. You don’t need to put there nothing at all because we will not use the USERNAME string replacement on this one, but if you want to you can put your username there 🙂

    NOTE #2: This is not the prettiest solution but… maybe in a few days I’ll have the time to add the code using the photo as a clickable link to it.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Author Box Reloaded] Add link to posts by author’ is closed to new replies.