fork download
  1. <?php
  2. /*
  3. Template Name: Блог
  4. */
  5. ?>
  6. <?php get_header(); ?>
  7.  
  8. <div class="content-main">
  9. <?php get_sidebar(); ?>
  10. <div class="content-left">
  11. <?php add_filter('excerpt_length', 'blog_excerpt_length'); ?>
  12. <?php
  13.  
  14. $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
  15.  
  16. $args = array(
  17. 'cat' => -2, 7,
  18. 'paged' => get_query_var('paged'),
  19. 'posts_per_page' => 3,
  20. );
  21.  
  22. $query = new WP_Query( $args );
  23.  
  24. if ( $query->have_posts() ) {
  25. while ( $query->have_posts() ) {
  26. $query->the_post(); ?>
  27.  
  28. <div class="content-left">
  29. <div class="blog-post-main">
  30. <div class="blog-post-content">
  31. <h2 class="blog-post-title"><a href="<?php the_permalink(); ?>"> <?php the_title(); ?> </a><span class="blog-post-date"><?php the_time('d.m.Y'); ?></span></h2>
  32. <?php echo get_the_post_thumbnail(); ?>
  33. <p class="blog-post-text"> <?php echo get_the_excerpt(); ?> </p>
  34. </div>
  35. <div class="blog-post-info">
  36. <span class="blog-post-line"></span>
  37. <div class="blog-post-info-left">
  38. <span><?php the_tags(); ?></span>
  39. </div>
  40. <div class="blog-post-info-button-main">
  41. <span class="blog-post-info-button"><a href="<?php the_permalink(); ?>">ЧИТАТЬ ДАЛЕЕ</a></span>
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46.  
  47. <?php }
  48. } else {
  49.  
  50. }
  51.  
  52. wp_reset_postdata();
  53.  
  54. ?>
  55. </div>
  56.  
  57.  
  58. <div class="pagination">
  59. <?php wp_pagenavi(); ?>
  60. </div>
  61.  
  62. </div>
  63.  
  64. <?php get_footer(); ?>
Runtime error #stdin #stdout #stderr 0.03s 52480KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
PHP Fatal error:  Call to undefined function get_header() in /home/jtuawe/prog.php on line 6