• I made a custom while loop with have_posts to use the Image Photo plugin (https://www.ads-software.com/extend/plugins/user-photo/) anywhere I want it.

    I assumed that the have_posts indicates that if the blog has at least one post? Please see the example below provided.

    My problem is when I am on a page that does not return the author it does not work. Is there an alternative to post_author like blog_owner I can use that would work even where there is no actual post? I hope that makes sense ??

    —-Example—-

    <?php while (have_posts()) : the_post(); ?>
    <?php userphoto($posts[0]->post_author); ?>
    <?php endwhile; ?>

  • The topic ‘While Loop using post_author to blog owner instead?’ is closed to new replies.