Guest User

Untitled

a guest
Nov 10th, 2019
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.01 KB | None | 0 0
  1. <?php
  2. /**
  3. * @Theme Name : Quality-Pro
  4. * @file : index-blog.php
  5. * @package : Quality-Pro
  6. * @license : license.txt
  7. * @filesource : wp-content/themes/quality/index-blog.php
  8. */
  9. ?>
  10. <!-- News Section ---->
  11. <?php
  12. $quality_pro_options=theme_data_setup();
  13. $current_options = wp_parse_args( get_option( 'quality_pro_options', array() ), $quality_pro_options );
  14.  
  15. if ( $current_options['home_blog_enabled'] == true ) { ?>
  16. <section id="section-block" class="news">
  17. <div class="container">
  18. <?php
  19. $quality_pro_options=theme_data_setup();
  20. $current_options = wp_parse_args( get_option( 'quality_pro_options', array() ), $quality_pro_options );
  21. if(($current_options['home_blog']) || ($current_options['home_blog_description']!='' )) { ?>
  22. <div class="row">
  23. <div class="section-header">
  24. <?php if($current_options['home_blog']) { ?>
  25. <p><?php echo $current_options['home_blog']; ?></p>
  26. <?php } if($current_options['home_blog_description']) { ?>
  27. <h1 class="widget-title"><?php echo $current_options['home_blog_description']; ?></h1>
  28. <?php } ?>
  29. <hr class="divider">
  30. </div>
  31. </div>
  32. <?php } ?>
  33. <div class="row">
  34. <?php
  35. $j=1;
  36. $args = array( 'post_type' => 'post','posts_per_page' =>4,'post__not_in'=>get_option("sticky_posts"));
  37. query_posts( $args );
  38. if(query_posts( $args ))
  39. { while(have_posts()):the_post();
  40. {
  41. $recent_expet = get_the_excerpt(); ?>
  42. <div class="col-md-6 col-sm-6 col-xs-12">
  43. <article class="post">
  44. <?php $defalt_arg =array('class' => "img-responsive");
  45. if(has_post_thumbnail()):?>
  46. <figure class="post-thumbnail">
  47. <?php the_post_thumbnail('', $defalt_arg); ?>
  48. </figure>
  49. <?php endif; ?>
  50.  
  51. <div class="post-content">
  52. <?php if($current_options['home_meta_section_settings'] == '' ) {?>
  53. <div class="item-meta">
  54. <a class="author-image item-image" href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) );?>"><?php echo get_avatar( get_the_author_meta('user_email'), $size = '40'); ?></a>
  55. <?php echo ' ';?><a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) );?>"><?php echo get_the_author();?></a>
  56. <br>
  57. <a class="entry-date" href="<?php echo get_month_link(get_post_time('Y'),get_post_time('m')); ?>">
  58. <?php echo get_the_date('M j, Y'); ?></a>
  59. </div>
  60. <?php } ?>
  61. <header class="entry-header">
  62. <h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
  63. </header>
  64. <div class="entry-content">
  65. <?php the_content(__('Read More','quality')); ?>
  66. </div>
  67. <?php if($current_options['home_meta_section_settings'] == '' ) {?>
  68. <hr />
  69. <div class="entry-meta">
  70. <span class="comment-links"><a href="<?php the_permalink(); ?>"><?php comments_number(__( 'No Comments', 'quality'), __('One comment', 'quality'), __('% comments', 'quality')); ?></a></span>
  71. <?php $cat_list = get_the_category_list();
  72. if(!empty($cat_list)) { ?>
  73. <span class="cat-links"><?php _e('In','quality');?><a href="<?php the_permalink(); ?>"><?php the_category(' '); ?></a></span>
  74. <?php } ?>
  75.  
  76. </div>
  77. <?php } ?>
  78. </div>
  79. </article>
  80. </div>
  81. <?php }
  82. if($j%2==0){ echo "<div class='clearfix'></div>"; } $j++;
  83. endwhile;
  84. } if($current_options['view_more_btn_text']) { ?>
  85. <div class="row">
  86. <div class="col-md-12 col-xs-12">
  87. <div class="btn-block text-center">
  88. <a class="btn-large" <?php if($current_options['view_more_button_link_target'] == true ) { echo "target='_blank'"; } ?> href="<?php if($current_options['view_more_button_link']) { echo $current_options['view_more_button_link']; } ?>" class="btn-large"><?php echo $current_options['view_more_btn_text']; ?></a>
  89. </div>
  90. </div>
  91. </div>
  92. <?php } ?>
  93.  
  94. </div>
  95. </div>
  96. <!-- /Quality Blog Section ---->
  97. </section>
  98. <?php } ?>
Add Comment
Please, Sign In to add comment