Advertisement
towfiqi

page-blog.php

Dec 27th, 2013
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.64 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: Blog Page Template
  4. */
  5. ?>
  6. <?php global $asteria;?>
  7. <?php get_header(); ?>
  8.  
  9. <div class="fixed_site">
  10. <!--BIG PAGE HEADER START-->
  11. <div class="fixed_wrap singlefx">
  12. <?php if(($asteria['page_type_id']) == '1'){ ?>
  13. <div class="page_tt">
  14. <div class="center"><h1 class="postitle"><?php the_title(); ?></h1></div>
  15. </div>
  16. <?php } ?>
  17. <!--BIG PAGE HEADER END-->
  18.  
  19. <div id="content" class="lay5">
  20. <div class="center">
  21.  
  22. <div class="single_wrap<?php if ( !is_active_sidebar( 'sidebar' ) ) { ?> no_sidebar<?php } ?>">
  23. <div class="lay5_wrap">
  24. <?php
  25.  
  26. $args = array(
  27. 'post_type' => 'post',
  28. 'cat' => ''.$asteria['blog_cat_id'].'',
  29. 'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1),
  30. 'posts_per_page' => '6');
  31. $the_query = new WP_Query( $args );
  32. ?>
  33. <?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
  34. <div class="single_post">
  35. <div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
  36.  
  37. <?php if ( is_user_logged_in() || is_admin() ) { ?><div class="edit_wrap"><a href="<?php echo get_edit_post_link( ); ?>"><i title="<?php _e('Edit This','asteria'); ?>" class="fa-edit"></i></a></div><?php } ?>
  38.  
  39. <div class="single_post_content">
  40. <h2 class="postitle"><a href="<?php the_permalink();?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
  41. <div class="single_metainfo">
  42. <i class="fa-calendar"></i><a class="comm_date"><?php the_time( get_option('date_format') ); ?></a>
  43. <i class="fa-user"></i><?php global $authordata;
  44. $post_author = "<a class='auth_meta' href=\"".get_author_posts_url( $authordata->ID, $authordata->user_nicename )."\">".get_the_author()."</a>\r\n";
  45. echo $post_author; ?>
  46. <i class="fa-comments"></i><?php if (!empty($post->post_password)) { ?>
  47. <?php } else { ?><div class="meta_comm"><?php comments_popup_link( __('0 Comment', 'asteria'), __('1 Comment', 'asteria'), __('% Comments', 'asteria'), '', __('Off' , 'asteria')); ?></div><?php } ?>
  48.  
  49. <i class="fa-th-list"></i><div class="catag_list"><?php the_category(', '); ?></div>
  50. </div>
  51. <div class="thn_post_wrap">
  52. <?php the_content(); ?> </div>
  53. <div style="clear:both"></div>
  54. <div class="thn_post_wrap"><?php wp_link_pages('<p class="pages"><strong>'.__('Pages:').'</strong> ', '</p>', 'number'); ?></div>
  55.  
  56.  
  57. </div>
  58.  
  59.  
  60.  
  61. </div>
  62. </div>
  63. <?php endwhile ?>
  64.  
  65. <?php wp_reset_postdata(); ?>
  66. </div>
  67.  
  68. <!--PAGINATION START-->
  69. <div class="ast_pagenav">
  70. <?php
  71. global $wp_query;
  72. $big = 999999999; // need an unlikely integer
  73. echo paginate_links( array(
  74. 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
  75. 'format' => '?paged=%#%',
  76. 'current' => max( 1, get_query_var('paged') ),
  77. 'total' => $wp_query->max_num_pages,
  78. 'show_all' => true,
  79. 'prev_next' => false
  80.  
  81. ) );
  82. ?>
  83. </div>
  84. <!--PAGINATION END-->
  85.  
  86. </div>
  87. <!--SIDEBAR START-->
  88. <?php if ( is_active_sidebar( 'sidebar' ) ) { ?><?php get_sidebar();?><?php } ?>
  89. <!--SIDEBAR END-->
  90. </div>
  91. </div>
  92. </div>
  93. </div>
  94. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement