Hi, I am almost positive I remember seeing a thread that had outlined how to do if/then statements with smarty tags, but for the life of me I cannot find it. Essentially, what I want am trying to do is customize my sidebar area so that different messaging displays based on their active product ID and whether or not they are logged in. User not logged in - display content A User logged in with product #1 or 2 or 3 - display content B User logged in with product # 3 or 4 or 5 - display content C We use wordpress and pages are PHP. Any help is appreciated!
For smarty: {foreach from=$products item=p} {if $p.product_id eq "1"} do this {else} do other {/if} {/foreach} But you are asking about PHP? Unclear. David
BTW- if you are using amprotect, you can use the widget logic plugin to do the sidebar: http://www.membershipacademy.com/blog/tips/amprotect-with-the-widget-logic-plugin/ Or use the amprotect text widget. If in V4, use the amember text widget. David
David, thanks for the fast replies, I got it to work! We are using the amProtect plugin, not sure why I didn't think of it before!