• 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

    (@sc0ttkclark)

    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.

    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

    (@keraweb)

    Hi @frisoni and @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

    (@frisoni)

    Hi @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

    (@keraweb)

    Hi @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=

    Please also mention this topic in the description!

    Cheers, Jory

    Thread Starter Guilherme Frisoni

    (@frisoni)

    Hey @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

    Regards, Frisoni

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

The topic ‘Shortcode problem inside IF/ENDIF’ is closed to new replies.