Advertisement
Guest User

Posts em Varias Divs

a guest
May 29th, 2012
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.20 KB | None | 0 0
  1. Arquivo Noticiashome.php
  2.  
  3.  
  4. <?php
  5.  
  6. $noticiashome = new WP_Query('showposts=1&category_name=Restaurantes&orderby=date&offset=2');
  7.  
  8. ?>
  9.  
  10. Arquivo latest.php
  11.  
  12.  <div class="latest_l">
  13.  
  14. <div class="latest">
  15.  
  16. <div class="header">
  17.  
  18. <h1>Noticias</h1>
  19.  
  20. </div><!-- #header -->
  21.  
  22. <!--Arquivo Latest é o De Noticias -->
  23.  
  24. <?php
  25. //list featured slide previews
  26. require_once('noticiashome.php');
  27. $i = 0;
  28. global $noticiashome;
  29. $latest = $noticiashome;  while($latest->have_posts()) : $latest->the_post(); ?>
  30. <?php { $noborder = 'class="noborder"'; } ?>
  31. <?php { ?>
  32. <div class="inside">
  33.  
  34. <div class="top">
  35.  
  36. <?php if (  (function_exists('has_post_thumbnail')) && (has_post_thumbnail())  ) { ?>
  37. <?php $image_id = get_post_thumbnail_id();  $image_url = wp_get_attachment_image_src($image_id,'large');  $image_url = $image_url[0]; ?>
  38. <?php $blogurl = get_bloginfo('url'); $image_url = str_replace($blogurl, '', $image_url); ?>
  39. <a href="<?php the_permalink(); ?>">
  40. <img src="<?php echo bloginfo('template_url'); ?>/thumb.php?src=<?php echo $image_url; ?>&amp;w=200&amp;h=130&amp;zc=1&amp;q=100" alt="<?php echo the_title(); ?>" /></a><div class="heading"><?php } else { ?><div class="heading" style="width:100%;"><?php  }?>
  41.  
  42. <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
  43.  
  44. <!-- <span class="date"><?php //_e('Posted On:'); ?> <?php //the_time('F d, '); ?><?php //the_time(' Y'); ?></span> -->
  45.  
  46. <div class="pholder">
  47.  
  48. <p><?php echo excerpt(21); ?> [...]</p></div>
  49.  
  50.  
  51. </div><!-- #heading -->
  52.  
  53. </div><!-- #top -->
  54.  
  55.  <?php } ?>
  56.  
  57. <?php $i++; endwhile; ?>
  58.  
  59.  
  60. </div><!-- #inside -->
  61.  
  62. </div><!-- #latest -->
  63.  
  64. </div><!-- #latest_l -->
  65.  
  66. Arquivo featured_articles.php
  67.  
  68. <div class="latest_r_1">
  69.  
  70. <div class="latest">
  71.  
  72. <div class="header">
  73.  
  74. <h1></h1>
  75.  
  76. </div>
  77.  
  78. <!-- #header -->
  79.  
  80. <?php
  81. //list featured slide previews
  82. require_once('noticiashome.php');
  83. $i = 0;
  84. global $noticiashome;
  85.  
  86. $featureds = $noticiashome;  while($featureds->have_posts()) : $featureds->the_post(); ?>
  87. <?php { $noborder = 'class="noborder"'; } ?>
  88. <?php { ?>
  89.  
  90. <div class="inside">
  91.  
  92. <div class="top">
  93.  
  94. <?php if (  (function_exists('has_post_thumbnail')) && (has_post_thumbnail())  ) { ?>
  95. <?php $image_id = get_post_thumbnail_id();  $image_url = wp_get_attachment_image_src($image_id,'large');  $image_url = $image_url[0]; ?>
  96. <?php $blogurl = get_bloginfo('url'); $image_url = str_replace($blogurl, '', $image_url); ?>
  97. <a href="<?php the_permalink(); ?>">
  98. <img src="<?php echo bloginfo('template_url'); ?>/thumb.php?src=<?php echo $image_url; ?>&amp;w=200&amp;h=130&amp;zc=1&amp;q=100" alt="<?php echo the_title(); ?>" /></a><div class="heading"><?php } else { ?><div class="heading" style="width:100%;"><?php  }?>
  99.  
  100. <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
  101.  
  102. <!-- <span class="date"><?php /* _e('Posted On:'); ?> <?php the_time('F d, '); ?><?php the_time(' Y'); */?></span> -->
  103.  
  104. <div class="pholder">
  105.  
  106. <p><?php echo excerpt(21); ?> [...]</p>
  107.  
  108. </div>
  109.  
  110. </div><!-- #heading -->
  111.  
  112. </div><!-- #top -->
  113.  
  114. <?php } ?>
  115.  
  116. <?php $i++; endwhile; ?>
  117.  
  118. <?php if($i != 0){ ?>
  119.  
  120. </div><!-- #inside -->
  121.  
  122. <?php } ?>
  123.  
  124. </div><!-- #latest -->
  125.  
  126. </div><!-- #latest_r -->
  127.  
  128.  
  129. Arquivo featured_articles_2.php
  130.  
  131.  
  132. <div class="latest_r">
  133.  
  134. <div class="latest">
  135.  
  136. <div class="header_1">
  137.  
  138. <h1></h1>
  139.  
  140. </div>
  141.  
  142. <!-- #header -->
  143.  
  144. <?php
  145. //list featured slide previews
  146. require_once('noticiashome.php');
  147. $i = 0;
  148. global $noticiashome;
  149.  
  150. $featured = $noticiashome;  while($featured->have_posts()) : $featured->the_post(); ?>
  151. <?php { $noborder = 'class="noborder"'; }?>
  152. <?php { ?>
  153.  
  154. <div class="inside">
  155.  
  156. <div class="top">
  157.  
  158. <?php if (  (function_exists('has_post_thumbnail')) && (has_post_thumbnail())  ) { ?>
  159. <?php $image_id = get_post_thumbnail_id();  $image_url = wp_get_attachment_image_src($image_id,'large');  $image_url = $image_url[0]; ?>
  160. <?php $blogurl = get_bloginfo('url'); $image_url = str_replace($blogurl, '', $image_url); ?>
  161. <a href="<?php the_permalink(); ?>">
  162. <img src="<?php echo bloginfo('template_url'); ?>/thumb.php?src=<?php echo $image_url; ?>&amp;w=200&amp;h=130&amp;zc=1&amp;q=100" alt="<?php echo the_title(); ?>" /></a><div class="heading"><?php } else { ?><div class="heading" style="width:100%;"><?php  }?>
  163.  
  164. <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
  165.  
  166. <!-- <span class="date"><?php /* _e('Posted On:'); ?> <?php the_time('F d, '); ?><?php the_time(' Y'); */?></span> -->
  167.  
  168. <div class="pholder">
  169.  
  170. <p><?php echo excerpt(21); ?> [...]</p>
  171.  
  172. </div>
  173.  
  174. </div><!-- #heading -->
  175.  
  176. </div><!-- #top -->
  177.  
  178. <?php } ?>
  179.  
  180. <?php $i++; endwhile; ?>
  181.  
  182. <?php if($i != 0){ ?>
  183.  
  184. </div><!-- #inside -->
  185.  
  186. <?php } ?>
  187.  
  188. </div><!-- #latest -->
  189.  
  190. </div><!-- #latest_r -->
  191.  
  192.  
  193. Arquivo Latest_noticias.php
  194.  
  195.  <div class="latest_l_1">
  196.  
  197. <div class="latest">
  198.  
  199. <div class="header">
  200.  
  201.  
  202.  
  203. </div><!-- #header -->
  204.  
  205. <!--Arquivo Latest é o De Noticias -->
  206.  
  207. <?php
  208. //list featured slide previews
  209. require_once('noticiashome.php');
  210. $i = 0;
  211. global $noticiashome;
  212. $latest = $noticiashome; while($latest->have_posts()) : $latest->the_post(); ?>
  213. <?php { $noborder = 'class="noborder"'; } ?>
  214. <?php { ?>
  215. <div class="inside">
  216.  
  217. <div class="top">
  218.  
  219. <?php if (  (function_exists('has_post_thumbnail')) && (has_post_thumbnail())  ) { ?>
  220. <?php $image_id = get_post_thumbnail_id();  $image_url = wp_get_attachment_image_src($image_id,'large');  $image_url = $image_url[0]; ?>
  221. <?php $blogurl = get_bloginfo('url'); $image_url = str_replace($blogurl, '', $image_url); ?>
  222. <a href="<?php the_permalink(); ?>">
  223. <img src="<?php echo bloginfo('template_url'); ?>/thumb.php?src=<?php echo $image_url; ?>&amp;w=200&amp;h=130&amp;zc=1&amp;q=100" alt="<?php echo the_title(); ?>" /></a><div class="heading"><?php } else { ?><div class="heading" style="width:100%;"><?php  }?>
  224.  
  225. <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
  226.  
  227. <!-- <span class="date"><?php //_e('Posted On:'); ?> <?php //the_time('F d, '); ?><?php //the_time(' Y'); ?></span> -->
  228.  
  229. <div class="pholder">
  230.  
  231. <p><?php echo excerpt(21); ?> [...]</p></div>
  232.  
  233.  
  234. </div><!-- #heading -->
  235.  
  236. </div><!-- #top -->
  237.  
  238.  <?php } ?>
  239.  
  240. <?php $i++; endwhile; ?>
  241.  
  242.  
  243. </div><!-- #inside -->
  244.  
  245. </div><!-- #latest -->
  246.  
  247. </div><!-- #latest_l -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement