index.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php get_header() ?>
  2. <!-- https://codex.wordpress.org/Custom_Headers -->
  3. <img class="img-responsive" src="<?php header_image(); ?>" height="<?php echo get_custom_header()->height; ?>" width="<?php echo get_custom_header()->width; ?>" alt="" />
  4. <div class="conteudo">
  5. <main>
  6. <section class="meio">
  7. <div class="container">
  8. <div class="row">
  9. <div class="noticias col-md-9">
  10. <?php
  11. // se tiver algum post publicado, executar
  12. if(have_posts()) :
  13. /// enquanto houver algum post, chame o post de determinada maneira
  14. while (have_posts()) : the_post();
  15. ?>
  16. <!-- funcao que funciona como um include do php -->
  17. <?php get_template_part('content', get_post_format()); ?>
  18. <!-- get_template_part('content', 'pagina' - se tiver um aquivo content-pagina ira ser chamado -->
  19. <?php
  20. endwhile;
  21. ?>
  22. <div class="paginacao text-left">
  23. <?php next_posts_link('<< Mais Antigos'); ?>
  24. </div>
  25. <div class="paginacao text-right">
  26. <?php previous_posts_link('Mais Novos >>'); ?>
  27. </div>
  28. <?php
  29. else:
  30. ?>
  31. <p>Não tem nada ainda pra mostrar</p>
  32. <?php
  33. endif;
  34. ?>
  35. </div>
  36. <aside class="barra-lateral col-md-3">
  37. <?php get_sidebar('blog');?>
  38. </aside>
  39. </div>
  40. </div>
  41. </section>
  42. </main>
  43. </div>
  44. <?php get_footer() ?>