Advertisement
Guest User

Untitled

a guest
Mar 25th, 2015
353
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.89 KB | None | 0 0
  1. <?php
  2. // function for post meta
  3. if ( ! function_exists( 'appointment_aside_meta_content' ) ) :
  4.  
  5. function appointment_aside_meta_content()
  6. { ?>
  7. <?php $current_options=get_option('appointment_options');
  8. if($current_options['meta_section_settings']=='on') { ?>
  9. <!--show date of post-->
  10. <aside class="blog-post-date-area">
  11. <div class="date"><?php echo get_the_date('j'); ?> <div class="month-year"><?php echo get_the_date('M'); ?>,<?php echo get_the_date('Y'); ?></div></div>
  12. <div class="comment"><a href="<?php the_permalink(); ?>"><i class="fa fa-comments"></i><?php comments_number( '', 'o', '%' ); ?></a></div>
  13. </aside>
  14. <?php } ?>
  15. <?php } endif;
  16.  
  17.  
  18. if ( ! function_exists( 'appointment_post_meta_content' ) ) :
  19. function appointment_post_meta_content()
  20. { ?>
  21. <?php $current_options=get_option('appointment_options');
  22. if($current_options['meta_section_settings']=='on') { ?>
  23. <div class="blog-post-lg">
  24. <a 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><?php _e('By','appointment');?><a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) );?>"><?php echo get_the_author();?></a>
  25. <?php $tag_list = get_the_tag_list();
  26. if(!empty($tag_list)) { ?>
  27. <div class="blog-tags-lg"><i class="fa fa-tags"></i><?php the_tags('', ', ', ''); ?></div>
  28. <?php } ?>
  29. </div>
  30. <?php }
  31. } endif;
  32.  
  33. // this functions accepts two parameters first is the preset size of the image and second is for additional classes, you can also add yours
  34. if(!function_exists( 'appointment_post_thumbnail')) :
  35.  
  36. function appointment_post_thumbnail($preset,$class){
  37. if(has_post_thumbnail()){ ?>
  38. <?php $defalt_arg =array('class' => $class);
  39. if(!is_single()){?>
  40.  
  41. <div class="blog-lg-box">
  42. <a class ="img-responsive" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" >
  43. <?php the_post_thumbnail($preset, $defalt_arg); ?>
  44. </div>
  45. <?php }
  46. else { ?>
  47.  
  48. <div class="blog-lg-box">
  49. <a class ="img-responsive" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" >
  50. <?php the_post_thumbnail($preset, $defalt_arg); ?>
  51. </div>
  52. <?php } } } endif;?>
  53.  
  54. <?php
  55. // this functions accepts one parameters for image class
  56. if(!function_exists( 'appointment_image_thumbnail')) :
  57. function appointment_image_thumbnail($preset,$class){
  58. if(has_post_thumbnail()){ ?>
  59. <?php $defalt_arg =array('class' => $class);
  60. the_post_thumbnail($preset, $defalt_arg);?>
  61.  
  62. <?php } } endif;?>
  63. <?php
  64. // This Function Check whether Sidebar active or Not
  65. if(!function_exists( 'appointment_post_layout_class' )) :
  66.  
  67. function appointment_post_layout_class(){
  68. if(is_active_sidebar('sidebar-primary'))
  69. { echo 'col-md-8'; }
  70. else
  71. { echo 'col-md-12'; }
  72. } endif;
  73. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement