Guest User

Untitled

a guest
Jul 27th, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.93 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: Blog Right Sidebar
  4. */
  5. get_header();
  6. $wallstreet_pro_options=theme_data_setup();
  7. $current_options = wp_parse_args( get_option( 'wallstreet_pro_options', array() ), $wallstreet_pro_options );
  8. ?>
  9. <!-- Page Title Section -->
  10. <?php get_template_part('index', 'banner'); ?>
  11. <!-- /Page Title Section -->
  12.  
  13. <!-- Blog & Sidebar Section -->
  14. <div class="container">
  15. <div class="row">
  16.  
  17. <div class="col-md-8">
  18. <?php
  19. $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
  20. $args = array( 'post_type' => 'post','paged'=>$paged);
  21. $post_type_data = new WP_Query( $args );
  22. while($post_type_data->have_posts()){
  23. $post_type_data->the_post();
  24. global $more;
  25. $more = 0;
  26. ?>
  27. <div id="post-<?php the_ID(); ?>" <?php post_class('blog-section-left'); ?>>
  28. <?php if(has_post_thumbnail()){ ?>
  29. <?php $defalt_arg =array('class' => "img-responsive attachment-post-thumbnail"); ?>
  30. <div class="blog-post-img">
  31. <?php the_post_thumbnail('', $defalt_arg); ?>
  32. </div>
  33. <?php } ?>
  34. <div class="clear"></div>
  35. <div class="blog-post-title">
  36. <?php if($current_options['blog_meta_section_settings'] == false) {?>
  37. <div class="blog-post-date"><span class="date"><?php echo get_the_date('j'); ?> <small><?php echo get_the_date('M'); ?></small></span>
  38. <span class="comment"><i class="fa fa-comment"></i><?php comments_number('0', '1','%'); ?></span>
  39. </div>
  40. <div class="blog-post-title-wrapper">
  41. <?php } else { ?>
  42. <div class="blog-post-title-wrapper" style="width:100%;">
  43. <?php } ?>
  44. <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
  45. <p><?php the_content( __( 'Read More' , 'wallstreet' ) );
  46. // echo get_home_blog_excerpt();
  47. ?></p>
  48. <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Page', 'wallstreet' ), 'after' => '</div>' ) ); ?>
  49. <?php if($current_options['blog_meta_section_settings'] == false) {?>
  50. <div class="blog-post-meta">
  51. <a id="blog-author" href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><i class="fa fa-user"></i> <?php the_author(); ?></a>
  52. <?php $tag_list = get_the_tag_list();
  53. if(!empty($tag_list)) { ?>
  54. <div class="blog-tags">
  55. <i class="fa fa-tags"></i><?php the_tags('', ', ', ''); ?>
  56. </div>
  57. <?php } ?>
  58. <?php $cat_list = get_the_category_list();
  59. if(!empty($cat_list)) { ?>
  60. <div class="blog-tags">
  61. <i class="fa fa-star"></i><?php the_category(', '); ?>
  62. </div>
  63. <?php } ?>
  64. </div>
  65. <?php } ?>
  66. </div>
  67. </div>
  68. </div>
  69. <?php } ?>
  70. <?php
  71. $Webriti_pagination = new Webriti_pagination();
  72. $Webriti_pagination->Webriti_page($paged, $post_type_data);
  73. ?>
  74. </div><!--/Blog Area-->
  75. <?php get_sidebar(); ?>
  76. </div>
  77. </div>
  78. <?php get_footer(); ?>
  79. <!-- /Blog & Sidebar Section -->
Add Comment
Please, Sign In to add comment