Advertisement
Guest User

Untitled

a guest
Feb 18th, 2018
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. <?php
  2. /**
  3. * Archive pages.
  4. *
  5. * @package The7
  6. * @since 1.0.0
  7. */
  8.  
  9. // File Security Check
  10. if ( ! defined( 'ABSPATH' ) ) { exit; }
  11.  
  12. $config = presscore_config();
  13. $config->set( 'template', 'archive' );
  14. $config->set( 'layout', 'grid' );
  15. $config->set( 'template.layout.type', 'grid' );
  16.  
  17. get_header();
  18. ?>
  19. <!-- Content -->
  20. <div id="content" class="content" role="main">
  21.  
  22. <?php
  23. the_archive_description( '<div class="taxonomy-description">', '</div>' );
  24.  
  25. if ( ! have_posts() ) {
  26. get_template_part( 'no-results', 'search' );
  27. } else {
  28. do_action( 'presscore_before_loop' );
  29.  
  30. // backup config
  31. $config_backup = $config->get();
  32.  
  33. // masonry container open
  34. echo '<div ' . presscore_masonry_container_class( array( 'wf-container' ) ) . presscore_masonry_container_data_atts() . '>';
  35. while ( have_posts() ) {
  36. the_post();
  37.  
  38.  
  39. presscore_archive_post_content();
  40. $config->reset( $config_backup );
  41. $config->set( 'posts.per.page', '12' );
  42. $config->set( 'post.meta.fields.author', '0' );
  43.  
  44. }
  45. // masonry container close
  46. echo '</div>';
  47.  
  48. dt_paginator();
  49.  
  50. do_action( 'presscore_after_loop' );
  51. }
  52. ?>
  53.  
  54. </div><!-- #content -->
  55.  
  56. <?php do_action( 'presscore_after_content' ) ?>
  57.  
  58. <?php get_footer() ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement