Guest User

Untitled

a guest
Jan 9th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.37 KB | None | 0 0
  1. <?php
  2. $appointment_options=theme_setup_data();
  3. $news_setting = wp_parse_args(  get_option( 'appointment_options', array() ), $appointment_options );
  4. if($news_setting['home_blog_enabled'] == 0 ) { ?>
  5. <div class="blog-section">
  6.     <div class="container">
  7.    
  8.         <!-- Section Title -->
  9.         <div class="row">
  10.             <div class="col-md-12">
  11.                 <div class="section-heading-title">
  12.                     <h1><?php echo $news_setting['blog_heading']; ?></h1>
  13.                     <p><?php echo $news_setting['blog_description']; ?></p>
  14.                 </div>
  15.             </div>
  16.         </div>
  17.         <!-- /Section Title -->
  18.        
  19.         <div class="row">
  20.         <?php
  21.        
  22.         $cat_id = array();
  23.         $cat_id = $news_setting['blog_selected_category_id'];
  24.         $no_of_post = $news_setting['post_display_count']; 
  25.        
  26.         if( $news_setting['home_slider_post_enable']==false )
  27.         {
  28.             $args = array( 'post_type' => 'post','ignore_sticky_posts' => 1 , 'category__not_in'=>$news_setting['slider_select_category'], 'posts_per_page' => $no_of_post);
  29.         }
  30.         else
  31.         {
  32.         $args = array( 'post_type' => 'post','ignore_sticky_posts' => 1 , 'category__in' => $cat_id, 'posts_per_page' => $no_of_post);
  33.         }
  34.         $news_query = new WP_Query($args);
  35.          $i=1;
  36.             while($news_query->have_posts() ) : $news_query->the_post();               
  37.             ?>
  38.             <div class="col-md-6">
  39.                 <div class="blog-sm-area">
  40.                     <div class="media">
  41.                         <div class="blog-sm-box">
  42.                             <?php $defalt_arg =array('class' => "img-responsive"); ?>
  43.                             <?php if(has_post_thumbnail()): ?>
  44.                             <?php the_post_thumbnail('', $defalt_arg); ?>
  45.                             <?php endif; ?>
  46.                         </div>
  47.                         <div class="media-body">
  48.                         <?php $appointment_options=theme_setup_data();
  49.                               $news_setting = wp_parse_args(  get_option( 'appointment_options', array() ), $appointment_options );
  50.                             if($news_setting['home_meta_section_settings'] == '' ) { ?>
  51.                             <div class="blog-post-sm">
  52.                                 <?php _e('By','appointment');?><a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) );?>"><?php echo get_the_author();?></a>
  53.                                 <a href="<?php echo get_month_link(get_post_time('Y'),get_post_time('m')); ?>">
  54.                                 <?php echo get_the_date('M j, Y'); ?></a>
  55.                                 <?php   $tag_list = get_the_tag_list();
  56.                                 if(!empty($tag_list)) ?>
  57.                                 <div class="blog-tags-sm"><?php the_tags('', ', ', ''); ?></div>
  58.                             </div>
  59.                             <?php  }?>
  60.                             <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
  61.                             <p><?php echo get_home_blog_excerpt(); ?></p>
  62.                         </div>
  63.                     </div>
  64.                 </div>
  65.             </div>
  66.             <?php
  67.               if($i==2)
  68.               {
  69.                  echo '<div class="clearfix"></div>';
  70.                  $i=0;
  71.               }$i++;
  72.               wp_reset_postdata();
  73.             endwhile;  ?>
  74.         </div>
  75.     </div>
  76. <?php } ?>
  77. </div>
  78.  
  79. <div class="blog-section">
  80.     <div class="container">
  81.    
  82.         <!-- Section Title -->
  83.         <div class="row">
  84.             <div class="col-md-12">
  85.                 <div class="section-heading-title">
  86.                     <h1>Latest Twitter feeds</h1>
  87.                     <p>Duis aute irure dolor in reprehenderit in voluptate velit cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupid non proident, sunt in culpa qui official deserunt mollit anim id est laborum.</p>
  88.                 </div>
  89.             </div>
  90.         </div>
  91.         <!-- /Section Title -->
  92.        
  93.         <div class="row">
  94.             <div class="col-md-12">
  95.                 <div class="blog-sm-area">
  96.                     <div class="media">
  97.                             <?php echo do_shortcode( '[custom-twitter-feeds]' );?>
  98.                         </div>
  99.                     </div>
  100.                 </div>
  101.             </div>
  102.         </div>
  103.     </div>
Add Comment
Please, Sign In to add comment