Viewing 2 replies - 1 through 2 (of 2 total)
  • Yes, by making it a PHP snippet you can achieve that. Taking the snippet you posted, and changing it to this, should work:

    echo "<div>Some text.";
    if ("{variable}" != "") {
        echo "<span>And here's my {variable}</span>";
    }
    echo "</div>";

    Cheers,
    Johan

    Thread Starter jvwx

    (@enfueggo)

    Beautiful. Love the plugin and this just made it 10x more useful. Thanks SO much!

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

The topic ‘Display content only if variable is provided’ is closed to new replies.