• Resolved millonario

    (@millonario)


    Hello, I give possibility to change the avatar to the users, the problem is that the avatars of the reviews are not changed, they remain as WordPress shows …

    Another problem is that it memorizes old avatars, each time the same person leaves a review, has different avatars …

    My question, can it be done so that the updated avatar of the users is seen? without saving the old photos ..

    I think that in this way users will be easier to see and know at all times that it is the same person to have the same avatar

    Thank you so much

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Gemini Labs

    (@geminilabs)

    @millonario

    To regenerate the avatar each time a review is displayed, paste the function in the following link to your active theme’s functions.php file:

    https://pastebin.com/zNxAr6U4

    • This reply was modified 6 years, 9 months ago by Gemini Labs.
    • This reply was modified 6 years, 9 months ago by Gemini Labs.
    • This reply was modified 6 years, 9 months ago by Gemini Labs.
    Thread Starter millonario

    (@millonario)

    Thank you very much, it has improved a bit since now all the avatars are the same, but I upload the avatar from the plugin “wp frontend user” and the problem is that the avatar that shows its plugin is different from the one the user has.

    Capture: https://image.ibb.co/iJdSDJ/avatarborrar_fw.png

    I imagine that the problem is serious and it takes a lot of code to fix it, if it is easy to solve, I would appreciate it if you could tell me how …

    Thank you very much again for everything, I love your plugin

    Plugin Author Gemini Labs

    (@geminilabs)

    Are you using the Pro version of the WP Frontend User plugin?

    Thread Starter millonario

    (@millonario)

    no, at the moment I am using the free..

    Plugin Author Gemini Labs

    (@geminilabs)

    I thought setting avatars was part of the Pro plugin.

    Please send more details on how the avatar is set (with screenshots if possible). Site Reviews uses the WordPress get_avatar_url() function to get the user’s avatar, so whichever plugin you are using to set a custom avatar (if it’s built correctly) should hook into the WordPress avatar functions.

    Thread Starter millonario

    (@millonario)

    To show the avatar in the posts I use this code:

    
    <?php
    											$user_id = get_current_user_id(); // Get the user ID
    											$size_avatar = 37; // Set the avatar size
    											 echo get_avatar( $user_id, $size_avatar, $default_avatar ); // This prints the <img /> tag with correct avatar image url
    											?>
    

    And it works very well .. but in the reviews it shows the default avatar marked in wordpress .. it is strange

    I would give the access data but work in LocalHost, and the capture only shows upload image, so I leave the code of the area .. if it can be useful … if this is difficult to solve, I will disable the avatars of the plugin, it’s not so nice but it’s not a big problem ??

    
    <div class="wpuf-fields">
                <div id="wpuf-avatar-125-upload-container" style="position: relative;"><div class="wpuf-file-warning"></div>
                    <div class="wpuf-attachment-upload-filelist" data-type="file" data-required="no">
                        <a href="#">Seleccionar imagen</a>
    
                        <ul class="wpuf-attachment-list thumbnails">
                            <li><img src="https://localhost/plantilla10/wp-content/uploads/2018/05/governor-poker-3-avatar.jpg" alt="" height="96" width="96" /><br><a href="#">Eliminar</a></li>                    </ul>
                    </div>
                <div id="html5_1cerdgc8m24l4qq1u52nmsvsc3_container" class="moxie-shim moxie-shim-html5" style="position: absolute; top: 0px; left: 225px; width: 149px; height: 28px; overflow: hidden; z-index: 0;"><input id="html5_1cerdgc8m24l4qq1u52nmsvsc3" type="file" style="font-size: 999px; opacity: 0; position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;" multiple="" accept="image/jpeg,image/gif,image/png,image/bmp"></div></div><!-- .container -->
    
                
            </div>
    
    • This reply was modified 6 years, 6 months ago by Jose Castaneda. Reason: fixed broken code
    Plugin Author Gemini Labs

    (@geminilabs)

    @millonario

    IMPORTANT: If you paste code, please wrap the text with the backtick character: `

    Or better yet, use https://pastebin.com

    Do both of these in the link give you the same avatar? https://pastebin.com/77dP0k5j

    • This reply was modified 6 years, 9 months ago by Gemini Labs.
    • This reply was modified 6 years, 9 months ago by Gemini Labs.
    • This reply was modified 6 years, 9 months ago by Gemini Labs.
    • This reply was modified 6 years, 9 months ago by Gemini Labs.
    • This reply was modified 6 years, 9 months ago by Gemini Labs.
    • This reply was modified 6 years, 9 months ago by Gemini Labs.
    • This reply was modified 6 years, 9 months ago by Gemini Labs.
    • This reply was modified 6 years, 9 months ago by Gemini Labs.
    • This reply was modified 6 years, 9 months ago by Gemini Labs.
    • This reply was modified 6 years, 9 months ago by Gemini Labs.
    • This reply was modified 6 years, 9 months ago by Gemini Labs.
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Small problem with avatars’ is closed to new replies.