Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save megane9988/6048651 to your computer and use it in GitHub Desktop.
Save megane9988/6048651 to your computer and use it in GitHub Desktop.
<div class="megane">
<h2>条件分岐</h2>
<p>
<?php if(is_home()) { ?>
ホーム
<?php } else { ?>
ホーム以外!
<?php } ?>
</p>
<p>
<?php if(is_home()) : ?>
ホームです
<?php else : ?>
ホーム以外です
<?php endif; ?>
</p>
<p>
<?php if (!is_home()) {
echo "ホーム以外!";
}
else{
echo "ホーム";
}
?>
</p>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment