Advertisement
Guest User

Untitled

a guest
Mar 25th, 2015
454
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.68 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. $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 } } endif;
  15.  
  16.  
  17. if ( ! function_exists( 'appointment_post_meta_content' ) ) :
  18. function appointment_post_meta_content()
  19. { $current_options=get_option('appointment_options');
  20. if($current_options['meta_section_settings']=='on') { ?>
  21. <div class="blog-post-lg">
  22. <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>
  23. <?php $tag_list = get_the_tag_list();
  24. if(!empty($tag_list)) { ?>
  25. <div class="blog-tags-lg"><i class="fa fa-tags"></i><?php the_tags('', ', ', ''); ?></div>
  26. <?php } ?>
  27. </div>
  28. <?php }
  29. } endif;
  30.  
  31. // this functions accepts two parameters first is the preset size of the image and second is for additional classes, you can also add yours
  32. if(!function_exists( 'appointment_post_thumbnail')) :
  33.  
  34. function appointment_post_thumbnail($preset,$class){
  35. if(has_post_thumbnail()){ $defalt_arg =array('class' => $class);
  36. if(!is_single()){?>
  37.  
  38. <div class="blog-lg-box">
  39. <a class ="img-responsive" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" >
  40. <?php the_post_thumbnail($preset, $defalt_arg); ?>
  41. </div>
  42. <?php }
  43. else { ?>
  44.  
  45. <div class="blog-lg-box">
  46. <a class ="img-responsive" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" >
  47. <?php the_post_thumbnail($preset, $defalt_arg); ?>
  48. </div>
  49. <?php } } } endif;
  50. // this functions accepts one parameters for image class
  51. if(!function_exists( 'appointment_image_thumbnail')) :
  52. function appointment_image_thumbnail($preset,$class){
  53. if(has_post_thumbnail()){ ?>
  54. <?php $defalt_arg =array('class' => $class);
  55. the_post_thumbnail($preset, $defalt_arg);
  56. } } endif;
  57. // This Function Check whether Sidebar active or Not
  58. if(!function_exists( 'appointment_post_layout_class' )) :
  59.  
  60. function appointment_post_layout_class(){
  61. if(is_active_sidebar('sidebar-primary'))
  62. { echo 'col-md-8'; }
  63. else
  64. { echo 'col-md-12'; }
  65. } endif;
  66. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement