Advertisement
Guest User

archive.php

a guest
Jun 21st, 2013
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.74 KB | None | 0 0
  1. <?php
  2.     global $avia_config, $more;
  3.  
  4.     /*
  5.      * get_header is a basic wordpress function, used to retrieve the header.php file in your theme directory.
  6.      */
  7.      get_header();
  8.  
  9.      echo avia_title(array('title' => avia_which_archive()));
  10.     ?>
  11.  
  12.         <div class='container_wrap main_color <?php avia_layout_class( 'main' ); ?>'>
  13.  
  14.             <div class='container template-blog '>
  15.  
  16.                 <div class='content <?php avia_layout_class( 'content' ); ?> units'>
  17.                 <?php
  18.  
  19.                 if(avia_get_option('blog_style','multi-big') == 'blog-grid')
  20.                 {
  21.                     global $posts;
  22.                     $post_ids = array();
  23.                     foreach($posts as $post) $post_ids[] = $post->ID;
  24.  
  25.                     $atts   = array(
  26.                         'type' => 'grid',
  27.                         'items' => get_option('posts_per_page'),
  28.                         'columns' => 3,
  29.                         'class' => 'avia-builder-el-no-sibling',
  30.                         'paginate' => 'yes',
  31.                         'use_main_query_pagination' => 'yes',
  32.                         'custom_query' => array( 'post__in'=>$post_ids, 'post_type'=>get_post_types() )
  33.                     );
  34.  
  35.                     $blog = new avia_post_slider($atts);
  36.                     $blog->query_entries();
  37.                     echo "<div class='entry-content'>".$blog->html()."</div>";
  38.                 }
  39.                 else
  40.                 {
  41.                     /* Run the loop to output the posts.
  42.                     * If you want to overload this in a child theme then include a file
  43.                     * called loop-index.php and that will be used instead.
  44.                     */
  45.  
  46.                     $more = 0;
  47.                     get_template_part( 'includes/loop', 'index' );
  48.                 }
  49.                 ?>
  50.  
  51.  
  52.                 <!--end content-->
  53.                 </div>
  54.  
  55.                 <?php
  56.  
  57.                 //get the sidebar
  58.                 $avia_config['currently_viewing'] = 'blog';
  59.                 get_sidebar('archive');
  60.  
  61.                 ?>
  62.  
  63.             </div><!--end container-->
  64.  
  65.  
  66.  
  67.  
  68. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement