Guest User

Untitled

a guest
Jul 20th, 2020
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.93 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. $args = array( 'post_type' => 'post','posts_per_page' =>3,'post__not_in'=>get_option("sticky_posts"));
  36. query_posts( $args );
  37. if(query_posts( $args ))
  38. { while(have_posts()):the_post();
  39. {
  40. $recent_expet = get_the_excerpt(); ?>
  41. <div class="col-md-4 col-sm-6 col-xs-12">
  42. <article class="post">
  43. <?php $defalt_arg =array('class' => "img-responsive");
  44. if(has_post_thumbnail()):?>
  45. <figure class="post-thumbnail">
  46. <?php the_post_thumbnail('', $defalt_arg); ?>
  47. </figure>
  48. <?php endif; ?>
  49.  
  50. <div class="post-content">
  51. <?php if($current_options['home_meta_section_settings'] == '' ) {?>
  52. <div class="item-meta">
  53. <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>
  54. <?php echo ' ';?><a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) );?>"><?php echo get_the_author();?></a>
  55. <br>
  56. <a class="entry-date" href="<?php echo get_month_link(get_post_time('Y'),get_post_time('m')); ?>">
  57. <?php echo get_the_date('M j, Y'); ?></a>
  58. </div>
  59. <?php } ?>
  60. <header class="entry-header">
  61. <h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
  62. </header>
  63. <div class="entry-content">
  64. <?php the_content(__('Read More','quality')); ?>
  65. </div>
  66. <?php if($current_options['home_meta_section_settings'] == '' ) {?>
  67. <hr />
  68. <div class="entry-meta">
  69. <span class="comment-links"><a href="<?php the_permalink(); ?>"><?php comments_number(__( 'No Comments', 'quality'), __('One comment', 'quality'), __('% comments', 'quality')); ?></a></span>
  70. <?php $cat_list = get_the_category_list();
  71. if(!empty($cat_list)) { ?>
  72. <span class="cat-links"><?php _e('In','quality');?><a href="<?php the_permalink(); ?>"><?php the_category(' '); ?></a></span>
  73. <?php } ?>
  74.  
  75. </div>
  76. <?php } ?>
  77. </div>
  78. </article>
  79. </div>
  80. <?php } endwhile;
  81. } if($current_options['view_more_btn_text']) { ?>
  82. <div class="row">
  83. <div class="col-md-12 col-xs-12">
  84. <div class="btn-block text-center">
  85. <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>
  86. </div>
  87. </div>
  88. </div>
  89. <?php } ?>
  90.  
  91. </div>
  92. </div>
  93. <!-- /Quality Blog Section ---->
  94. </section>
  95. <?php } ?>
Add Comment
Please, Sign In to add comment