Title: Shortcode problem inside IF/ENDIF
Last modified: October 27, 2021

---

# Shortcode problem inside IF/ENDIF

 *  Resolved [Guilherme Frisoni](https://wordpress.org/support/users/frisoni/)
 * (@frisoni)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/shortcode-problem-inside-if-endif/)
 * Inside a Template I use some shortcodes from my theme.
    Aftar 2.8.2 update, shortcodes
   inside IF/ELSE/ENDIF are not converting to html.
 * Example:
 *     ```
       [if adotado]
       [button text="Adotado" color="alert" radius="10" expand="true" icon="icon-heart" icon_pos="left"]
       [else]
       [button text="Saiba Mais" radius="10" expand="true" icon="icon-heart" icon_pos="left" link="{@permalink}"]
       [/if]
       ```
   
 * Render this code:
 *     ```
       <a href="https://woocommerce-494822-2148013.cloudwaysapps.com/viramor/denis/" target="_self" class="button primary expand"  style="border-radius:10px;">
         <i class="icon-heart" ></i>  <span>Saiba Mais</span>
         </a>
       [button text="Saiba Mais" radius="10" expand="true" icon="icon-heart" icon_pos="left" link="https://woocommerce-494822-2148013.cloudwaysapps.com/viramor/denis/"]
       ```
   

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

 *  Plugin Author [Scott Kingsley Clark](https://wordpress.org/support/users/sc0ttkclark/)
 * (@sc0ttkclark)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/shortcode-problem-inside-if-endif/#post-15017601)
 * I’ll take a look at what’s going on here and get back to you once I determine
   what our solution for this will be. Thanks for your patience here.
 *  [SweetManiac](https://wordpress.org/support/users/sweetmaniac/)
 * (@sweetmaniac)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/shortcode-problem-inside-if-endif/#post-15030794)
 * Hi!
 * Same thing here, my theme shortcodes and other WordPress shortcodes are not rendered
   inside the if/else statements in Pod Templates.
 * Meanwhile I reinstalled version 2.7.31 and it works again.
 *  Plugin Author [Jory Hogeveen](https://wordpress.org/support/users/keraweb/)
 * (@keraweb)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/shortcode-problem-inside-if-endif/#post-15037578)
 * Hi [@frisoni](https://wordpress.org/support/users/frisoni/) and [@sweetmaniac](https://wordpress.org/support/users/sweetmaniac/)
 * I tried to reproduce your issues but I cannot. When I test locally it both if
   true and if false are working.
    Where are you using the templates and how are
   you calling them?
 * Cheers, Jory
 *  Thread Starter [Guilherme Frisoni](https://wordpress.org/support/users/frisoni/)
 * (@frisoni)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/shortcode-problem-inside-if-endif/#post-15037663)
 * Hi [@keraweb](https://wordpress.org/support/users/keraweb/).
 * Inside a normal page I call this shortcode:
    `[pods name="diva" template="Diva-
   Item - Loop" orderby="post_date DESC" limit="-1"]`
 * In this template I have the following code:
 *     ```
       [if produto]
       [button text="{@produto}" letter_case="lowercase" style="underline" size="small" icon="icon-star" icon_pos="left" link="{@produto.permalink}"]
       [else]
       [button text="{@nome_produto}" letter_case="lowercase" style="underline" size="small" icon="icon-star" icon_pos="left"]
       [/if]
       ```
   
 * {@produto} and other variables are corrected translated, but the button shortcode
   don’t. So, I ended up with this string in my page:
    `[button text="Peruca Wig-
   ELENA" letter_case="lowercase" style="underline" size="small" icon="icon-star"
   icon_pos="left" link="https://woocommerce-511254-2145904.cloudwaysapps.com/perucas-
   e-lace-wigs/peruca-wig-elena/"]`
 * This button shortcode is from my theme, Flatsome.
 * I also allowed shortcodes in template on wp_config.php and functions.php, but
   this should not be the error as it works in 2.7.31.
 * Thanks, Frisoni
 *  Plugin Author [Jory Hogeveen](https://wordpress.org/support/users/keraweb/)
 * (@keraweb)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/shortcode-problem-inside-if-endif/#post-15039635)
 * Hi [@frisoni](https://wordpress.org/support/users/frisoni/)
 * Could you please file a full bug report on GitHub so we can replicate your installation
   and take a closer look?
 * [https://github.com/pods-framework/pods/issues/new?assignees=&labels=Type%3A+Bug&template=bug_report.md&title=](https://github.com/pods-framework/pods/issues/new?assignees=&labels=Type%3A+Bug&template=bug_report.md&title=)
 * Please also mention this topic in the description!
 * Cheers, Jory
 *  Thread Starter [Guilherme Frisoni](https://wordpress.org/support/users/frisoni/)
 * (@frisoni)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/shortcode-problem-inside-if-endif/#post-15040289)
 * Hey [@keraweb](https://wordpress.org/support/users/keraweb/) .
 * I created the issue on Github and also pointed the function that was changed 
   in last version which is causing the problem.
 * [https://github.com/pods-framework/pods/issues/6290](https://github.com/pods-framework/pods/issues/6290)
 * Regards, Frisoni
    -  This reply was modified 4 years, 6 months ago by [Guilherme Frisoni](https://wordpress.org/support/users/frisoni/).

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

The topic ‘Shortcode problem inside IF/ENDIF’ 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/)

 * 6 replies
 * 4 participants
 * Last reply from: [Guilherme Frisoni](https://wordpress.org/support/users/frisoni/)
 * Last activity: [4 years, 6 months ago](https://wordpress.org/support/topic/shortcode-problem-inside-if-endif/#post-15040289)
 * Status: resolved