Showing Author's post in author's bio page sidebar (3 posts)

  1. isign4jc
    Posted 2 years ago #

    My client has a handful of individual bio pages for each of his post authors for his website. He would like for the posts by that author to automatically show in the sidebar of their bio page. How is the best way of doing this? Here is a sample of his own bio page: http://www.sladeresearch.com/about-us/our-associates/allen-slade/ .

  2. Kawsar
    Posted 2 years ago #

    You have to use a loop on the sidebar. Paste the following on the sidebar

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    		<?php the_author_description(); ?> <!--display author description -->
    <?php endwhile; else: ?>
    <?php endif; ?>
    <?php  wp_reset_query(); ?> <!--Reset wordpress query -->

    If you need custom field for author bio check here

  3. isign4jc
    Posted 2 years ago #

    Thank you, but I'm not sure if you understood. These are bio PAGES, not POSTS, where the sidebar should show the most recent 5 posts from the author that is being talked about on the bio page. It looks like the code above will show the author's bio, which is not what I need. Any further ideas?

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.