if, elseif, else


/ Published in: Other
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php if ( is_page('1') ) { ?>
  2. <!-- enter something here -->
  3.  
  4. <?php } elseif ( is_page('2') ) { ?>
  5. <!-- enter somthing else-->
  6.  
  7. <?php } else { ?>
  8. <!-- something else -->
  9.  
  10. <?php } ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.