Advertisement
Guest User

Untitled

a guest
Sep 17th, 2014
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.78 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3. <?php
  4.  
  5. $tecnologia = new WP_Query( array(
  6. 'category_name' => 'tecnologia',
  7. 'posts_per_page' => 1,
  8. 'paged' => $paged
  9. ) );
  10.  
  11.  
  12. ?>
  13.  
  14. <div id="conteudo">
  15.  
  16. <div id="meio_esquerda">
  17. <div id="artigos">
  18.  
  19. <div align="center"><?php if( function_exists('cyclone_slider') ) cyclone_slider('videos'); ?></div>
  20.  
  21. <?php query_posts('cat=1&showposts=1'); ?>
  22.  
  23. <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
  24. <div class="artigo">
  25.  
  26. <div class="artigo_titulo"><a href="<?php the_permalink() ?>"><h4><?php title_excerpt(16); ?> . . .</h4></a></div>
  27.  
  28. <div class="artigo_texto">
  29.  
  30. <div align="center">
  31. <?php
  32.  
  33. if ( has_post_thumbnail() ) {
  34. the_post_thumbnail('sem-categoria');
  35. }
  36. else {
  37. echo '<img src="' . get_bloginfo( 'stylesheet_directory' ) . '/imagens/semimagem.png" />';
  38. }
  39. ?>
  40. </div>
  41.  
  42. <p>Postado por <?php the_author() ?> em <?php the_time('d/M/Y') ?> - <?php comments_popup_link('Sem Comentários', '1 Comentário', '% Comentários', 'comments-link', ''); ?> <?php edit_post_link('(Editar)'); ?></p>
  43. <p><?php the_excerpt(); ?></p>
  44.  
  45. </div>
  46.  
  47. <?php endwhile?>
  48. <?php else: ?>
  49. <div class="artigo">
  50. <h2>Nada Encontrado</h2>
  51. <p>Erro 404</p>
  52. <p>Lamentamos mas não foram encontrados artigos.</p>
  53. </div>
  54. <?php endif; ?>
  55. </div>
  56.  
  57. <?php query_posts('cat=2&showposts=1'); ?>
  58.  
  59. <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
  60. <div class="artigo">
  61. <?php ?>
  62. <div class="artigo_titulo"><a href="<?php the_permalink() ?>"><h4><?php title_excerpt(16); ?> . . .</h4></a></div>
  63. <div class="artigo_texto">
  64.  
  65. <div align="center">
  66. <?php
  67.  
  68. if ( has_post_thumbnail() ) {
  69. the_post_thumbnail('games');
  70. }
  71. else {
  72. echo '<img src="' . get_bloginfo( 'stylesheet_directory' ) . '/imagens/semimagem.png" />';
  73. }
  74. ?>
  75. </div>
  76.  
  77.  
  78. <p>Postado por <?php the_author() ?> em <?php the_time('d/M/Y') ?> - <?php comments_popup_link('Sem Comentários', '1 Comentário', '% Comentários', 'comments-link', ''); ?> <?php edit_post_link('(Editar)'); ?></p>
  79. <p><?php the_excerpt(); ?></p>
  80. </div>
  81. <?php endwhile?>
  82. <?php else: ?>
  83. <div class="artigo">
  84. <h2>Nada Encontrado</h2>
  85. <p>Erro 404</p>
  86. <p>Lamentamos mas não foram encontrados artigos.</p>
  87. </div>
  88. <?php endif; ?>
  89. </div>
  90.  
  91.  
  92. <?php if ( $tecnologia->have_posts() ) : while ( $tecnologia->have_posts() ) : $tecnologia->the_post(); ?>
  93.  
  94. <div class="artigo">
  95. <div class="artigo_titulo"><a href="<?php the_permalink() ?>"><h4><?php title_excerpt(16); ?> . . .</h4></a></div>
  96. <div class="artigo_texto">
  97.  
  98. <div align="center">
  99. <?php
  100.  
  101. if ( has_post_thumbnail() ) {
  102. the_post_thumbnail('tecnologia');
  103. }
  104. else {
  105. echo '<img src="' . get_bloginfo( 'stylesheet_directory' ) . '/imagens/semimagem.png" />';
  106. }
  107. ?>
  108. </div>
  109.  
  110. <p>Postado por <?php the_author() ?> em <?php the_time('d/M/Y') ?> - <?php comments_popup_link('Sem Comentários', '1 Comentário', '% Comentários', 'comments-link', ''); ?> <?php edit_post_link('(Editar)'); ?></p>
  111. <p><?php the_excerpt(); ?></p>
  112.  
  113. </div>
  114. <?php endwhile?>
  115. <?php else: ?>
  116. <div class="artigo">
  117. <h2>Nada Encontrado</h2>
  118. <p>Erro 404</p>
  119. <p>Lamentamos mas não foram encontrados artigos.</p>
  120. </div>
  121. <?php endif; ?>
  122. </div>
  123.  
  124.  
  125. </div>
  126.  
  127. <?php get_sidebar(); ?>
  128.  
  129. </div>
  130.  
  131.  
  132. </div>
  133. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement