Skip to content

Instantly share code, notes, and snippets.

@balintsera
Last active November 3, 2016 12:33
Show Gist options
  • Save balintsera/a6380c8b8f3e626c4f87f4e27a6786f8 to your computer and use it in GitHub Desktop.
Save balintsera/a6380c8b8f3e626c4f87f4e27a6786f8 to your computer and use it in GitHub Desktop.
Alternative and normal conditional syntax in WordPress
<?php
// inside a PHP tag
if (true) {
print "true";
}
?>
<!-- mixed with markup: alternative syntax -->
<?php if (true): ?>
<p>true</p>
<?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment