WordPress.org

Ready to get started?Download WordPress

Forums

WP User Avatar
[resolved] Admin avatar not showing (16 posts)

  1. Lock-N-Load
    Member
    Posted 1 year ago #

    I use this plugin on many, many WP blogs. Love it! Nice bit of style.

    However, on 1 new blog I am building I can install the plugin and set the custom avatar just fine BUT in the comments section of each blog post it only shows the generic Mystery Man. I cannot get it to use the clients custom avatar. I have never had this problem, not sure how to resolve it. I tried some of the code edits in the php, but that did not resolve it - it placed the custom avatar but it placed it for everyone's avatar as the default avatar which is no good - so I need some more help.

    we use this theme: http://pexetothemes.com/demos/dandelion_wp/ any help would be appreciated.

    http://wordpress.org/extend/plugins/wp-user-avatar/

  2. Lock-N-Load
    Member
    Posted 1 year ago #

    BTW, I changed this

    <?php echo get_avatar( $comment, $size='80', $default='' ); ?>

    to this

    <?php echo get_wp_user_avatar(get_the_author_meta('ID'), 96); ?>

    and it changed ALL comment avatars for everyone to the admins custom avatar in the comments section

    and if I just change get_avatar to get_wp_user_avatar and leave the rest, nothing happens at all.

  3. Bangbay Siboliban
    Member
    Posted 1 year ago #

    Hi, for comments, you should actually use:

    <?php echo get_wp_user_avatar($comment, 96); ?>

    get_the_author_meta('ID') will actually pull the avatar of the author of the post, so yes it'll end up being the same avatar for everyone! I'll update the FAQ to address the code for comments.

  4. Lock-N-Load
    Member
    Posted 1 year ago #

    It did not work either.

    I tried replacing this in the theme (comments.php)

    <?php echo get_avatar( $comment, $size='80', $default='' ); ?>

    with this

    <?php echo get_wp_user_avatar($comment, 96); ?>

    and nothing happens, same generic avatar is still used.

    and of all the code available in the themes appearance editor, this is the only page that has any mention of "avatar" in it. so it is logically where I am replacing.

  5. Bangbay Siboliban
    Member
    Posted 1 year ago #

    Hi, I'd like to go back to the beginning and get more info:

    • Is this a completely new site that you just set up?
    • If this is not a new site, were you using an older version of WP User Avatar and then upgraded? If that's the case, did the plugin ever work for you on this site?
    • If this is a new site, have you made any other modifications to the theme? (Besides changing get_avatar to get_wp_user_avatar.)
    • What version of the theme are you using?
    • What other plugins do you have installed?
  6. Lock-N-Load
    Member
    Posted 1 year ago #

    -totally new site, fresh install, 3.5.1
    -no previous version of WP User Avatar on this site
    -I have modified the theme using the themes advanced GUI settings panel under "Appearance", but not touched any other php or html files or edited any other files in the Editor. The "comments.php" file is the only file I have tried to edit and that is to fix this problem.
    -the theme has no version per se, but it is a brand new purchase, download and install from 3 days ago
    -9 plugins total: Yet Another Related Posts Plugin, WP User Avatar, WordPress SEO, Social Media Widget, Akismet, Follow, Google XML Sitemaps, ShareThis, Twitter Widget Pro and I do not think the issue is related to a conflicting plugin

  7. Bangbay Siboliban
    Member
    Posted 1 year ago #

    Hi, I was able to take a look at Dandelion 2.7.0, though 2.8.0 is the latest version. It seems to load the correct avatars. Have you tried switching to another theme (try the TwentyTwelve theme) to see if there's still a problem? If the problem goes away, then there's something about how Dandelion 2.8.0 calls the avatars that's overriding my plugin.

  8. Lock-N-Load
    Member
    Posted 1 year ago #

    if I switch themes, wont I loose all of the work done to setup and customize the current theme? I cannot afford to loose all of that time and work just to switch a theme.

    BTW, I use 2.8 version of that theme

  9. Bangbay Siboliban
    Member
    Posted 1 year ago #

    You shouldn't lose any of your settings, but I don't want to promise you anything. I often switch between themes when I need to do tests, and I've never encountered significant data loss. You can also back up your database before switching the theme (see: http://wordpress.org/extend/plugins/wp-dbmanager/).

  10. Lock-N-Load
    Member
    Posted 1 year ago #

    funny.. install another plugin, the very thing I might be having issues with, to backup the DB to test this plugin :) possibly opening up a new/different issue

    I actually did a DB backup from inside GoDaddy but frankly, I am not even to keen on changing themes and taking that risk just to make a plugin work. To much risk I think just for this.

    Any other ideas? It seems to me, in ALL of the editable pages you can edit from the editor there is only 1 page with a code line reference to "avatar" and it is that comments.php I mention above. I made the edit you suggested and nothing changed.

    Does it not seem like something in the theme is blocking the plugin from working? Maybe controlling the avatar function? I have server access to the blog, but not sure where else and what php or html pages I might look into for other avatar functions that are not available in the Appearance editor.

  11. Bangbay Siboliban
    Member
    Posted 1 year ago #

    You can try deleting the WP User Avatar plugin through your admin (the setting available to you after you deactivate the plugin). This will delete any references to WP User Avatar in your database. Then you can try a fresh install of the plugin.

    You can try re-installing WordPress or the theme files. Ultimately, I can't tell what the problem is, and there is the possibility that my plugin isn't compatible with your theme. If it's a matter of keeping the integrity of your site versus getting my plugin to work, then perhaps my plugin is non-essential for your site.

  12. Lock-N-Load
    Member
    Posted 1 year ago #

    deleting & reinstalling the plugin did not work.

    I also tried 4 other custom avatar plugins, none of them would place the custom avatar. all would install fine, allow me to set the avatar, but none would put the avatar into the comments like they should. so, I have to start to think.. something in that theme is conflicting. agreed?

    I am now in contact with the themes dev, but you know, it will be that endless circle of him pointing at your plugin, you pointing at his theme, me stuck in the middle :)

  13. Bangbay Siboliban
    Member
    Posted 1 year ago #

    I have another idea. In the comments.php, on line 25 is there a line that says:

    <?php wp_list_comments('type=all&callback=mytheme_comment'); ?>

    Could you change that to

    <?php wp_list_comments(); ?>

    It should revert comments to the WP default. Do the avatars show then? If they do, then it's a problem with how the mytheme_comment function is written.

  14. Lock-N-Load
    Member
    Posted 1 year ago #

    Nice try, but it did not work.

    The line was there, I changed it, but all it did was break the layout of the comments by reducing the generic avatar's original size (from 80x80 to 32x32) and did not place the custom avatar.

  15. Bangbay Siboliban
    Member
    Posted 1 year ago #

    Well, if you've used my plugin on other sites with different themes, then you know that it's worked for you. The theme is probably the main cause of the problem, but I wouldn't rule out a problem with your server, or something in your database. Which is why I suggested switching to another theme on the same server to test the settings, but I understand that you don't want to do that.

  16. Lock-N-Load
    Member
    Posted 1 year ago #

    I am thinking after all I have seen and tried, as I postulated before, it is a theme issue, but thought maybe we could solve it here or find a way to modify the code to make your plugin work or circumvent the themes code and place some of your code to make the plugin work. The themes dev has been informed of the issue and is looking into it also.

    I have gone as far as I am willing to go to solve this, changing themes and such is to much risk for this.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic