Title: Pods template code not working, Please help fix
Last modified: November 5, 2024

---

# Pods template code not working, Please help fix

 *  Resolved [Raj the teacher](https://wordpress.org/support/users/witu/)
 * (@witu)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/pods-template-code-not-working-please-help-fix/)
 * I am using the following code. technically the part {@_img.caption,,<p>,</p>}
   should work like, if the caption is not empty, you need to display or you should
   not display. But I see that the empty tags of P is always displaying. Am I missing
   anything?
 *     ```wp-block-code
       [if download_links_2]    <ul class="download_links">       [each download_links_2]           <li>{@_img.caption,,<p>,</p>}<a href="{@_src,esc_url}">{@_img.title}</a></li>       [/each]     </ul> [/if]
       ```
   

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

 *  Thread Starter [Raj the teacher](https://wordpress.org/support/users/witu/)
 * (@witu)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/pods-template-code-not-working-please-help-fix/#post-18115686)
 * [@keraweb](https://wordpress.org/support/users/keraweb/) Can you please have 
   a look?
 *  Plugin Author [Jory Hogeveen](https://wordpress.org/support/users/keraweb/)
 * (@keraweb)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/pods-template-code-not-working-please-help-fix/#post-18115868)
 * Hi [@witu](https://wordpress.org/support/users/witu/)
 * I think this is because en image caption is not `null` not `false` but an empty
   string.
 * Quickly made a patch to address this: [https://github.com/pods-framework/pods/pull/7377](https://github.com/pods-framework/pods/pull/7377)
   
   Could you test it and confirm whether it works for you or not?
 * Cheers, Jory
 *  Thread Starter [Raj the teacher](https://wordpress.org/support/users/witu/)
 * (@witu)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/pods-template-code-not-working-please-help-fix/#post-18115925)
 * Man, you are awesome. Thank you.
 *  Thread Starter [Raj the teacher](https://wordpress.org/support/users/witu/)
 * (@witu)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/pods-template-code-not-working-please-help-fix/#post-18116062)
 * [@keraweb](https://wordpress.org/support/users/keraweb/) Yes it works. I tested
   the code in my site and it works very fine. Thanks for your time and effort.

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

The topic ‘Pods template code not working, Please help fix’ is closed to new replies.

 * ![](https://ps.w.org/pods/assets/icon.svg?rev=3286397)
 * [Pods - Custom Content Types and Fields](https://wordpress.org/plugins/pods/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pods/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pods/)
 * [Active Topics](https://wordpress.org/support/plugin/pods/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pods/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pods/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Raj the teacher](https://wordpress.org/support/users/witu/)
 * Last activity: [1 year, 7 months ago](https://wordpress.org/support/topic/pods-template-code-not-working-please-help-fix/#post-18116062)
 * Status: resolved