Guest User

Untitled

a guest
Dec 11th, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.10 KB | None | 0 0
  1. <?php
  2.     global $wp_query;
  3.     $pagina = $wp_query->get('paged');
  4.     if(!empty($pagina)){
  5.             $pagina = 'paged=' . $pagina;
  6.     }
  7.    
  8.     global $more;
  9.     $more = -1; //declare and set $more before The Loop
  10.     $wp_query = new WP_Query("post_type=noticia&post_status=publish&posts_per_page=6&{$pagina}");
  11.    
  12.     if (have_posts ()):
  13.    
  14.     while ($wp_query->have_posts()) : $wp_query->the_post();
  15.        
  16.     ?>
  17.     <div class="boxBlog">
  18.         <h3><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
  19.         <p>Postado em <?php the_date(); ?>.</p>
  20.         <?php the_content(); ?>
  21.         <div class="clearfix"></div>
  22.         <div class="boxTags">
  23.             <?php the_taxonomies(); ?>
  24.         </div>
  25.        <!-- <div>
  26.             <div id="fb-root"></div>
  27.             <script>(function(d, s, id) {
  28.               var js, fjs = d.getElementsByTagName(s)[0];
  29.               if (d.getElementById(id)) {return;}
  30.               js = d.createElement(s); js.id = id;
  31.               js.src = "//connect.facebook.net/pt_BR/all.js#xfbml=1";
  32.               fjs.parentNode.insertBefore(js, fjs);
  33.             }(document, 'script', 'facebook-jssdk'));</script>
  34.            
  35.             <div class="fb-comments" data-href="<?php the_permalink(); ?>" data-num-posts="4" data-width="600"></div>
  36.         </div>-->
  37.     </div>
  38.     <?php endwhile;
  39.     endif;
  40.     ?>
  41.  
  42. //Página tag.php
  43.  
  44. <?php
  45. if ( have_posts() ) : while ( have_posts() ) : the_post();
  46.    
  47. ?>
  48. <div class="boxBlog">
  49.     <h3><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
  50.     <p>Postado em <?php the_date(); ?>.</p>
  51.     <?php the_content(); ?>
  52.     <div class="clearfix"></div>
  53.     <div class="boxTags">
  54.         <?php the_tags(); ?>
  55.        
  56.     </div>
  57.    <!-- <div>
  58.         <div id="fb-root"></div>
  59.         <script>(function(d, s, id) {
  60.           var js, fjs = d.getElementsByTagName(s)[0];
  61.           if (d.getElementById(id)) {return;}
  62.           js = d.createElement(s); js.id = id;
  63.           js.src = "//connect.facebook.net/pt_BR/all.js#xfbml=1";
  64.           fjs.parentNode.insertBefore(js, fjs);
  65.         }(document, 'script', 'facebook-jssdk'));</script>
  66.        
  67.         <div class="fb-comments" data-href="<?php //the_permalink(); ?>" data-num-posts="4" data-width="600"></div>
  68.     </div>-->
  69. </div>
  70. <?php endwhile;
  71. endif;
  72. ?>
Add Comment
Please, Sign In to add comment