PageRenderTime 46ms CodeModel.GetById 11ms RepoModel.GetById 0ms app.codeStats 0ms

/pastrybox/parts/main.php

https://github.com/drecodeam/pastrybox
PHP | 52 lines | 41 code | 11 blank | 0 comment | 14 complexity | 63fc05de888e6583b83cc3e38a77a469 MD5 | raw file
  1. <div class="main" role="main">
  2. <h1 id="h-main" class="visuallyhidden">Main Content</h1>
  3. <?php
  4. if( is_page('stream') ) {
  5. require_once('parts/main/stream.php');
  6. }
  7. if( is_page('archives') ) {
  8. require_once('parts/main/archives.php');
  9. }
  10. if( is_page('most-recent') ) {
  11. require_once('parts/main/most-recent.php');
  12. }
  13. if( ( ( is_search() and have_posts() ) or is_archive() ) and !is_category() ) {
  14. require_once('parts/main/search-results.php');
  15. }
  16. if( is_category() ) {
  17. require_once('parts/main/baker.php');
  18. }
  19. if( is_front_page() or is_single() ) {
  20. require_once('parts/main/single-thought.php');
  21. }
  22. if( is_page( 'bakers' ) ) {
  23. require_once('parts/main/bakers.php');
  24. }
  25. if( is_page( 'about' ) ) {
  26. require_once('static/about.php');
  27. }
  28. if( is_page( 'disclaimer' ) ) {
  29. require_once('static/disclaimer.php');
  30. }
  31. if( is_page( 'privacy-policy' ) ) {
  32. require_once('static/privacy-policy.php');
  33. }
  34. if( is_page( 'terms-of-services' ) ) {
  35. require_once('static/terms-of-services.php');
  36. }
  37. if( is_404() || ( is_search() && !have_posts() ) ) {
  38. require_once('parts/main/not-found.php');
  39. }
  40. ?>
  41. </div><!-- /.main -->