burntheedges

page.php

Sep 5th, 2012
42
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. get_header();
  3. ?>
  4.  
  5.  
  6.  
  7. <!-- MAIN -->
  8. <section id="main" class="innerpage">
  9. <!-- Content of MAIN -->
  10. <div class="content">
  11.  
  12.  
  13. <!-- page wrap -->
  14. <div class="page_wrap">
  15.  
  16. <?php if (have_posts()) : while (have_posts()) : the_post();
  17. $custom_preview = get_post_meta($post->ID, "custom_preview", true);
  18. $custom_bg = get_post_meta($post->ID, "custom_bg", true);
  19. $custom_bg_repeat = get_post_meta($post->ID, "custom_bg_repeat", true);
  20. $src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), false, '' );
  21. ?>
  22. <?php
  23. // Custom background
  24. if($custom_bg) { ?>
  25. <style type="text/css">
  26. body{ background: url(<?php echo $custom_bg; ?>) fixed <?php echo $custom_bg_repeat; ?> center top!important;}
  27. </style>
  28. <?php } ?>
  29. <!-- Left part -->
  30. <div class="left_part">
  31.  
  32. <!-- Article -->
  33. <article class="blog_post" id="post-<?php echo $post->id; ?>">
  34.  
  35. <?php if($custom_preview){ ?>
  36. <!-- Preview -->
  37. <div class="post_preview">
  38. <?php echo $custom_preview; ?>
  39. </div>
  40. <!-- /Preview -->
  41. <?php } elseif($src !== ""){ ?>
  42. <!-- Preview -->
  43. <div class="post_preview">
  44. <?php $attr = array('class' => "", "alt" => get_the_title()); the_post_thumbnail('page_size',$attr); ?>
  45. </div>
  46. <!-- /Preview -->
  47. <?php } ?>
  48.  
  49. <!-- Post title Date -->
  50. <div class="title_page">
  51. <div class="padding_20">
  52. <h2 class="gfont"><?php the_title(); ?></h2>
  53. </div>
  54. </div>
  55. <!-- /Post title Date -->
  56.  
  57. <!-- Post Content -->
  58. <div class="post_content">
  59. <?php the_content(); ?>
  60. </div>
  61. <!-- /Post Content -->
  62.  
  63. </article>
  64. <!-- /Article -->
  65.  
  66.  
  67. </div>
  68. <!-- /Left part -->
  69. <?php endwhile; endif; ?>
  70.  
  71.  
  72.  
  73. <!-- Sidebar -->
  74. <aside id="sidebar">
  75.  
  76. <?php if(!dynamic_sidebar('Sidebar Pages')) : echo ''; endif; ?>
  77.  
  78. </aside>
  79. <!-- /Sidebar -->
  80.  
  81. <br class="clear" />
  82. </div>
  83. <!-- /page wrap -->
  84.  
  85. </div>
  86. <!-- /Content of MAIN -->
  87. </section>
  88. <!-- /MAIN -->
  89.  
  90.  
  91.  
  92.  
  93.  
  94. <?php
  95. get_footer();
  96. ?>
RAW Paste Data