Created
April 2, 2020 13:43
-
-
Save prosantamazumder/0e56a3de22550fa95ae3a95cd166fadc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
====================================== | |
if else WordPrss Page ID condition | |
====================================== | |
<?php if ( is_page('110') ) : ?> | |
//HTML CODE HERE... | |
<?php else : ?> | |
//HTML CODE HERE... | |
<?php endif; ?> | |
============================================== | |
if elseif else WordPress Page ID condition | |
============================================== | |
<?php if( is_page('120') ): ?> | |
<!-- HTML CODE HERE.. --> | |
<div class="option one"> | |
abc content | |
</div> | |
<?php elseif( is_page('120') ): ?> | |
<!-- HTML CODE HERE.. --> | |
<div class="option two"> | |
abc content | |
</div> | |
<?php else: ?> | |
<div class="option three"> | |
abc content | |
</div> | |
<?php endif; ?> | |
=============================== | |
if else WordPress Condition | |
=============================== | |
<?php if ($condition) : ?> | |
<p>Some code execute </p> | |
<?php else : ?> | |
<p>Some code execute</p> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment