Title: Conditional author description problem
Last modified: September 1, 2016

---

# Conditional author description problem

 *  [moxymore](https://wordpress.org/support/users/moxymore/)
 * (@moxymore)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/conditional-author-description-problem/)
 * Hi there,
 * I’m trying to display a “standard” description for users who haven’t wirtten 
   anything. Can you tell me why the [else] shortcode doesn’t work in this case?
 *     ```
       [field=author]
       [field avatar]
       [field author meta=user_email]
       [if field=author meta=description value=empty]
       C'est vide!
       [else]
       [field author meta=description]
       ```
   
 * Regards.
 * [https://wordpress.org/plugins/custom-content-shortcode/](https://wordpress.org/plugins/custom-content-shortcode/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [jgateman](https://wordpress.org/support/users/jgateman/)
 * (@jgateman)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/conditional-author-description-problem/#post-7640744)
 * You need to close your [if]. Try putting [/if] at the very end.
 * [field=author]
    [field avatar] [field author meta=user_email] [if field=author
   meta=description value=empty] C’est vide! [else] [field author meta=description][/
   if]
 *  Thread Starter [moxymore](https://wordpress.org/support/users/moxymore/)
 * (@moxymore)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/conditional-author-description-problem/#post-7640763)
 * Thank you for your answer. Unfortunately this doesn’t work.
 * I bet there is something wrong in this part of the code :
 * [if field=author meta=description value=empty]
 * I have tried a lot of thing, but nothing works. Any idea?
 *  Thread Starter [moxymore](https://wordpress.org/support/users/moxymore/)
 * (@moxymore)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/conditional-author-description-problem/#post-7640772)
 * I have tried other stuff like this one :
 * [if field=author meta=description empty=true]
 * But it doesn’t work too. Any help?
 *  Thread Starter [moxymore](https://wordpress.org/support/users/moxymore/)
 * (@moxymore)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/conditional-author-description-problem/#post-7640773)
 * I finally figured out on how to do this :
 *     ```
       [field author]
       [field avatar]
       [field author meta=user_email]
       [if exists]
         [field author meta=description]
       [else]
         C'est vide!
       [/if]
       ```
   

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Conditional author description problem’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-content-shortcode_766976.svg)
 * [Custom Content Shortcode](https://wordpress.org/plugins/custom-content-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/custom-content-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-content-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-content-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-content-shortcode/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [moxymore](https://wordpress.org/support/users/moxymore/)
 * Last activity: [9 years, 10 months ago](https://wordpress.org/support/topic/conditional-author-description-problem/#post-7640773)
 * Status: not resolved