conditional php to display DIV in easy hook


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

First snippet would go in before everything, second snippet in after everything hook.


Copy this code and paste it in your HTML
  1. if (!is_front_page()) {
  2. echo '';
  3. else {
  4. ?> <div id="innerwrapper">
  5. <?php }
  6. }
  7.  
  8.  
  9. // SECOND SNIPPET
  10.  
  11. if (!is_front_page()) {
  12. echo '';
  13. else {
  14. ?></div> <!--closing inner wrapper -->
  15. <?php }
  16. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.