Forums

[Plugin: User Photo] Getting photo into comment (5 posts)

  1. goto11
    Member
    Posted 3 years ago #

    Shouldn't it be just as easy as putting the function into the comment loop like this:

    <?php foreach ($comments as $comment) : ?>
    <div class="commentcontainer">
    <h3 id="comment-<?php comment_ID() ?>">
    <?userphoto_comment_author_photo()?>
    ...

    Nothing shows up. I must be missing something very obvious, but I can't seem to figure it out. Any assistance is appreciated. Thanks.

  2. goto11
    Member
    Posted 3 years ago #

    I tested to see if the function exists within the loop and it does not.

    <?php foreach ($comments as $comment) : ?>
    <div class="commentcontainer">
    <h3 id="comment-<?php comment_ID() ?>">
    <?
    if (function_exists('userphoto_comment_author_thumbnail()'))
    {
    userphoto_comment_author_thumbnail();
    }
    else
    {
    echo "FUNCTION DOES NOT EXIST";
    }
    ?>

    Does this help diagnose the problem?

  3. goto11
    Member
    Posted 3 years ago #

    Ok, I had a syntax error in the function_exists function. I fixed it and the function does exist. It just doesn't show the picture. HELP!

  4. goto11
    Member
    Posted 3 years ago #

    It appears that the plugin works, but only for users who register after the plugin is installed.

    I had been testing it with "admin" and another test user I established right after installing WordPress and I never got the userphoto to show. But when I created a new user and tried using it, no problem.

    This is fine for me because I am new to WordPress and can use the plugin from the beginning. But for people who install the plugin into established blogs, that seems terribly inconvenient.

  5. noyz319
    Member
    Posted 3 years ago #

    I'd like to use this plugin, but unfortunetly i'd like to use it on a pre-exisiting site, does anybody know a work around to get it work with users who've registered in the past?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags