wp/wp-content/themes/themeforest-2964855-scrn-responsive-single-page-portfolio/SCRN/page-template-blog.php
changeset 0 d970ebf37754
equal deleted inserted replaced
-1:000000000000 0:d970ebf37754
       
     1 <?php 
       
     2 
       
     3 
       
     4 
       
     5 /* 
       
     6 
       
     7 
       
     8 
       
     9 Template name: Blog page template
       
    10 
       
    11 
       
    12 
       
    13 */
       
    14 
       
    15 
       
    16 
       
    17 get_header();
       
    18 
       
    19 
       
    20 
       
    21 global $scrn;
       
    22 
       
    23 
       
    24 
       
    25 the_post(); 
       
    26 
       
    27 
       
    28 
       
    29 $options = get_post_meta($post->ID, 'vp_ptemplate_settings', true);
       
    30 
       
    31 
       
    32 
       
    33 ?>
       
    34 
       
    35 
       
    36 
       
    37  <div class="bg" style="text-align: left">
       
    38 
       
    39 
       
    40 
       
    41     <div class="container">
       
    42 
       
    43 
       
    44 
       
    45         <div class="sixteen columns">
       
    46 
       
    47 
       
    48 
       
    49             <div class="headline">
       
    50 
       
    51                     <h2><span class="lines"><?php $top_title = get_post_meta($post->ID, 'top_title', true); if($top_title != '') echo $top_title; else the_title();?></span></h2>
       
    52 
       
    53 
       
    54 
       
    55             </div>
       
    56 
       
    57 
       
    58 
       
    59             <?php
       
    60 
       
    61 
       
    62 
       
    63             $args['posts_per_page'] = $options['blog_posts'];
       
    64 
       
    65 
       
    66 
       
    67             if($options['categories'] != '')
       
    68 
       
    69 
       
    70 
       
    71                  $args['category__in'] = $options['categories'];
       
    72 
       
    73 
       
    74 
       
    75             $paged = is_front_page() ? get_query_var( 'page' ) : get_query_var( 'paged' );
       
    76 
       
    77 
       
    78 
       
    79             $args['paged'] = $paged;
       
    80 
       
    81 
       
    82 
       
    83             query_posts($args);
       
    84 
       
    85 
       
    86 
       
    87             $i = 1;
       
    88 
       
    89 
       
    90 
       
    91             if(have_posts()) : while(have_posts()) : the_post(); ?>
       
    92 
       
    93 
       
    94 
       
    95                 <div <?php post_class('article'); ?>>
       
    96 
       
    97 
       
    98 
       
    99                     <h3 style="margin-bottom: 5px"><a href="<?php the_permalink();?>"><?php the_title();?></a></h3>
       
   100 
       
   101 
       
   102 
       
   103                     <p class="line2nd meta">
       
   104 
       
   105 
       
   106 
       
   107                         <?php _e('Posted on', 'SCRN');?> <?php the_time("d M Y");?> 
       
   108 
       
   109 
       
   110 
       
   111                         in <?php the_category(', ') ?> | 
       
   112 
       
   113 
       
   114 
       
   115                         <?php comments_popup_link(esc_html__('0 comments','Tharsis'), esc_html__('1 comment','Tharsis'), '% '.esc_html__('comments','Tharsis')); ?>
       
   116 
       
   117 
       
   118 
       
   119                     </p>
       
   120 
       
   121 
       
   122 
       
   123                     <?php the_excerpt(); ?>
       
   124 
       
   125 
       
   126 
       
   127                     <a href="<?php the_permalink();?>"><div class="button1">Read More</div></a>
       
   128 
       
   129 
       
   130 
       
   131                 </div>
       
   132 
       
   133 
       
   134 
       
   135             <?php endwhile; 
       
   136 
       
   137 
       
   138 
       
   139             get_template_part('includes/pagination');
       
   140 
       
   141 
       
   142 
       
   143             endif; wp_reset_query();?>
       
   144 
       
   145 
       
   146 
       
   147         </div> <!-- end sixteen columns -->
       
   148 
       
   149 
       
   150 
       
   151     </div>
       
   152 
       
   153 
       
   154 
       
   155 </div>
       
   156 
       
   157 
       
   158 
       
   159 <?php get_footer();?>