Guest User

Untitled

a guest
Jul 10th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.22 KB | None | 0 0
  1. <?php
  2. /**
  3. * @Theme Name : wallstreet-Pro
  4. * @file : index-blog.php
  5. * @package : wallstreet-Pro
  6. @author : webriti
  7. * @filesource : wp-content/themes/wallstreet/index-blog.php
  8. */
  9. ?>
  10. <!-- wallstreet Blog Section ---->
  11. <?php
  12. $wallstreet_pro_options = theme_data_setup();
  13. $current_options = wp_parse_args(get_option('wallstreet_pro_options', array()), $wallstreet_pro_options);
  14. ?>
  15. <div class="container home-blog-section">
  16. <div class="row">
  17. <div class="section_heading_title">
  18. <?php if ($current_options['home_blog_heading']) { ?>
  19. <h1><?php echo $current_options['home_blog_heading']; ?></h1>
  20. <?php } ?>
  21. <?php if ($current_options['home_blog_description']) { ?>
  22. <div class="pagetitle-separator">
  23. <div class="pagetitle-separator-border">
  24. <div class="pagetitle-separator-box"></div>
  25. </div>
  26. </div>
  27. <p><?php echo $current_options['home_blog_description']; ?></p>
  28. <?php } ?>
  29. </div>
  30. </div>
  31. <div class="row">
  32. <?php
  33. $j = 1;
  34. $args = array('post_type' => 'post', 'posts_per_page' => 3, 'post__not_in' => get_option("sticky_posts"));
  35. query_posts($args);
  36. if (query_posts($args)) {
  37. while (have_posts()):the_post();
  38. $recent_expet = get_the_excerpt();
  39. ?>
  40. <div class="col-md-4 col-sm-6">
  41. <div class="home-blog-area">
  42. <div class="home-blog-post-img"><?php
  43. $defalt_arg = array('class' => "img-responsive");
  44. if (has_post_thumbnail()):
  45. ?>
  46. <a href="<?php the_permalink(); ?>">
  47.  
  48. <?php the_post_thumbnail('', $defalt_arg); ?>
  49.  
  50. </a>
  51. <?php
  52. endif;
  53. ?>
  54. </div>
  55. <div class="home-blog-info">
  56. <?php if ($current_options['home_meta_section_settings'] == false) { ?>
  57. <div class="home-blog-post-detail">
  58. <span class="date"><?php echo get_the_date(); ?> </span>
  59. <span class="comment"><a href="<?php the_permalink(); ?>"><i class="fa fa-comment"></i><?php comments_number(__('No Comments', 'wallstreet'), __('1 Comment', 'wallstreet'), __('% Comments', 'wallstreet')); ?></a></span>
  60. </div>
  61. <?php } ?>
  62. <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
  63. <div class="home-blog-description"><p><?php echo get_the_excerpt(); ?></p></div>
  64. <div class="home-blog-btn"><a href="<?php the_permalink(); ?>"><?php _e('Read More', 'wallstreet'); ?></a></div>
  65. </div>
  66. </div>
  67. </div>
  68. <?php
  69. if ($j % 3 == 0) {
  70. echo "<div class='clearfix'></div>";
  71. } $j++;
  72. endwhile;
  73. } else {
  74. echo "<div class='post_message'>" . __('No posts to show', 'wallstreet') . "</div>";
  75. }
  76. ?>
  77.  
  78.  
  79.  
  80. </div>
  81. <?php
  82. if ($current_options['view_all_posts_btn_enabled'] == true) {
  83. if ($current_options['view_all_posts_text']) {
  84. ?>
  85. <div class ="row">
  86. <div class="proejct-btn">
  87. <a href="<?php
  88. if ($current_options['all_posts_link'] != '') {
  89. echo $current_options['all_posts_link'];
  90. }
  91. ?>" <?php
  92. if ($current_options['view_all_lnik_target'] == true) {
  93. echo "target='_blank'";
  94. }
  95. ?>> <?php echo $current_options['view_all_posts_text']; ?> </a>
  96. </div>
  97. </div>
  98. <?php
  99. }
  100. }
  101. ?>
  102. </div><!-- /wallstreet Blog Section ---->
Add Comment
Please, Sign In to add comment