Title: Conditional Display
Last modified: August 21, 2016

---

# Conditional Display

 *  Resolved [nytx](https://wordpress.org/support/users/nytx/)
 * (@nytx)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/conditional-display-3/)
 * Hi, Thank you for your excellent plugin!
 * I am displaying user avatars in posts with this suggested code:
 * `<?php echo get_avatar($post->post_author); ?>`
 * It works great! Except I would like to be able to make it function so that, if
   a user does not have a user profile graphic/avatar, it defaults to display nothing.
   If I use your plugin settings to display “Blank” when there is no user avatar
   I still get text that is wrapped around where the graphics would be, creating
   an empty square where a user profile should otherwise be. I would like to get
   rid of this empty space when the user has now avatar.
 * Do you have any suggestions?
 * Thank you in advance for considering.
 * [http://wordpress.org/plugins/add-local-avatar/](http://wordpress.org/plugins/add-local-avatar/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [nytx](https://wordpress.org/support/users/nytx/)
 * (@nytx)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/conditional-display-3/#post-4173530)
 * Hello, Thanks for the recent upgrade. I am still trying to find a solution to
   the above problem. I am a novice at php and so not surprised that the code I 
   cobbled together below does not work. Do you — or anyone — have any recommendations?
 *     ```
       <?php
                   if ($avtr == 'get_avatar ($post->post_author , 80)') {
                     echo 'echo get_avatar';
                   } else {
                     echo "";
                   }
           ?>
       ```
   
 * Thank you!

Viewing 1 replies (of 1 total)

The topic ‘Conditional Display’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/add-local-avatar_a58c85.svg)
 * [Add Local Avatar](https://wordpress.org/plugins/add-local-avatar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/add-local-avatar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/add-local-avatar/)
 * [Active Topics](https://wordpress.org/support/plugin/add-local-avatar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/add-local-avatar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/add-local-avatar/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [nytx](https://wordpress.org/support/users/nytx/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/conditional-display-3/#post-4173530)
 * Status: resolved