Advertisement
Guest User

Untitled

a guest
Jul 9th, 2014
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.37 KB | None | 0 0
  1. <?php
  2. /*
  3. * Template Name: KNOW & SHARE
  4. * Description: Customized template.
  5. */
  6. ?>
  7.  
  8. <head>
  9. <style type="text/css">
  10. .entry-content-page {
  11. width: 1000px;
  12. }
  13.  
  14. #container {
  15. width: 1200px;
  16. margin-left: 70px;
  17. }
  18.  
  19. #parent-left {
  20. float:left;
  21. margin-top: 20px;
  22. }
  23.  
  24. #parent-right {
  25. float:left;
  26. margin-top: 20px;
  27. margin-left: 23px;
  28. }
  29.  
  30. #watch-share-title-box {
  31. background-color: #ebf6dc;
  32. width: 483px;
  33. height: 149px;
  34. font-size: 40px;
  35. text-align:center;
  36. vertical-align: middle;
  37. }
  38.  
  39. #read-share-title-box {
  40. background-color: #e0eef7;
  41. width: 483px;
  42. height: 149px;
  43. font-size: 40px;
  44. text-align:center;
  45. vertical-align: middle;
  46. }
  47.  
  48. #read-share {
  49. background-color: #e0eef7;
  50. width: 483px;
  51. margin-top: 10px;
  52. height: 900px;
  53. }
  54.  
  55. #watch-share {
  56. background-color: #d6edb9;
  57. width: 483px;
  58. margin-top: 10px;
  59. height: 900px;
  60. }
  61.  
  62. p.header {
  63. font-size: 42px;
  64. vertical-align:middle;
  65. top: 30%;
  66. position:relative;
  67. }
  68.  
  69. #posts{
  70. border-bottom:1px solid #8b9aa2;
  71. padding: 10px 5px 5px 5px;
  72. margin-left: 20px;
  73. margin-right: 20px;
  74. }
  75.  
  76. a.links{
  77. color:#3b3831;
  78. font-size: 16px;
  79. text-decoration:none;
  80. }
  81. </style>
  82. </head>
  83.  
  84.  
  85. <?php get_header(); ?>
  86.  
  87. <div id="container" >
  88.  
  89. <div class="entry-content-page">
  90. <?php
  91. if (have_posts()) {
  92. while(have_posts()) {
  93. the_post();
  94. the_content();
  95. }
  96. }
  97. ?>
  98. </div>
  99.  
  100. <div id="parent-left">
  101. <div id="watch-share-title-box">
  102. <p class="header">WATCH <br/><span style="font-size: 18px;">AND SHARE</span></p>
  103. </div>
  104. <div id="watch-share">
  105. <?php
  106. $args = array (
  107. 'cat' => '4',
  108. 'posts_per_page' => '2',
  109. );
  110.  
  111. $the_posts = new WP_Query($args);
  112. if($the_posts->have_posts()) {
  113. while($the_posts->have_posts()){
  114. $the_posts->the_post();
  115. $id = get_the_ID();
  116. ?>
  117. <div id="posts">
  118. <strong><?php the_title_attribute(); ?> </strong>
  119. <p><?php the_content(); ?></p>
  120.  
  121. </div>
  122. <?php
  123. }?>
  124. <div class="alignleft"><?php next_post_link('%link &raquo;') ?></div>
  125. <div class="alignright"><?php previous_post_link('&laquo; %link') ?></div>
  126. <?php
  127. }
  128. wp_reset_postdata();
  129.  
  130. ?>
  131. </div>
  132. </div>
  133.  
  134. <div id="parent-right">
  135. <div id="read-share-title-box">
  136. <p class="header">READ <br/><span style="font-size: 18px;">AND SHARE</span></p>
  137. </div>
  138. <div id="read-share">
  139. <?php
  140.  
  141. $args = array (
  142. 'cat' => '1',
  143. 'posts_per_page' => '5',
  144. );
  145.  
  146. $the_posts = new WP_Query($args);
  147. if($the_posts->have_posts()) {
  148. while($the_posts->have_posts()){
  149. $the_posts->the_post();
  150. ?>
  151. <div id="posts">
  152. <a class="links" href="<?php echo get_permalink(); ?>"> <strong><?php the_title_attribute(); ?></strong></a>
  153. <p><?php the_content(); ?> </p>
  154. </div>
  155.  
  156. <?php
  157. } ?>
  158. <div class="alignright"><?php next_post_link('%link &raquo;') ?></div>
  159. <div class="alignleft"><?php previous_post_link('&laquo; %link') ?></div>
  160. <?php
  161. }
  162. wp_reset_postdata();
  163. ?>
  164.  
  165. </div>
  166. </div>
  167. <?php get_footer(); ?>
  168. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement