Advertisement
Guest User

Untitled

a guest
Apr 24th, 2013
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.34 KB | None | 0 0
  1. <?php /* Template name: News */ ?>
  2. <?php get_header(); ?>
  3.   <div id="center">
  4.    
  5.         <div class="conteudo">
  6. <div class="single-content">
  7.     <div class="sleft">
  8.                
  9.             <h1 id="resultados">Arquivo de  Notícias Gastrocom</h1>
  10.                 <?php
  11.     $temp = $wp_query;
  12.     $wp_query= null;
  13.    
  14.     $argsves = array(
  15.                     'post_type' => 'noticias',
  16.                     'paged' => '$paged',
  17.                     'posts_per_page' => 1,
  18.                     'orderby' => 'date',
  19.                     'order'=>'DESC' );
  20. $wp_query = new WP_Query( $argsves );
  21.  
  22. if ($wp_query->have_posts()) :
  23. while ($wp_query->have_posts()) : $wp_query->the_post();
  24. ?>
  25.  
  26. <a href="<?php the_permalink(); ?>"><h2><?php the_title(); ?></h2></a>
  27.  
  28. <div class="data-post" style="margin-top: -30px !important;"><?php the_date(); ?></div>
  29. <a href="<?php the_permalink(); ?>" class="veresult">Abrir</a>
  30. <hr />
  31.  
  32.         <?php endwhile; wp_reset_query(); ?> </div><?php else : ?>
  33.             <h2>Sem Notícias</h2>
  34.  
  35.  
  36.  
  37.             </div>
  38.             <?php endif;?>
  39.             <div class="sright">
  40.                 <div class="mais-news">
  41.                     <div class="mais-titulo"><h2>Últimas Notícias</h2></div>
  42.                     <?php get_template_part("loop", "maisnews"); ?>
  43.                 </div>
  44.             </div>
  45.             </div>
  46.         </div>
  47.        
  48.            
  49.            
  50.        </div>
  51.        <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement