Advertisement
towfiqi

single.php

Jun 28th, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.59 KB | None | 0 0
  1. <?php global $optimizer;?>
  2. <?php get_header(); ?>
  3.  
  4. <div class="post_wrap layer_wrapper">
  5.  
  6. <div id="content">
  7. <div class="center">
  8. <!--POST START-->
  9. <div class="single_wrap<?php if ( !is_active_sidebar( 'sidebar' ) ) { ?> no_sidebar<?php } ?>">
  10. <div class="single_post">
  11.  
  12. <?php if(have_posts()): ?><?php while(have_posts()): ?><?php the_post(); ?>
  13. <div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
  14.  
  15. <!--EDIT BUTTON START-->
  16. <?php if ( is_user_logged_in() && is_admin() ) { ?>
  17. <div class="edit_wrap">
  18. <a href="<?php echo get_edit_post_link(); ?>">
  19. <?php _e('Edit','optimizer'); ?>
  20. </a>
  21. </div>
  22. <?php } ?>
  23. <!--EDIT BUTTON END-->
  24.  
  25. <!--POST START-->
  26. <div class="single_post_content">
  27.  
  28. <h1 class="postitle entry-title"><?php the_title(); ?></h1>
  29. <!--POST INFO START-->
  30. <?php if (!empty ($optimizer['post_info_id']) || is_customize_preview()) { ?>
  31. <div class="single_metainfo <?php if (empty($optimizer['post_info_id'])){ echo 'hide_singlemeta';}?>">
  32. <!--DATE-->
  33. <i class="fa-calendar"></i><a class="comm_date post-date updated"><?php the_time( get_option('date_format') ); ?></a>
  34. <!--AUTHOR-->
  35. <i class="fa-user"></i><?php global $authordata; $post_author = "<a class='vcard author post-author' href=\"".get_author_posts_url( $authordata->ID, $authordata->user_nicename )."\"><span class='fn author'>".get_the_author()."</span></a>\r\n"; echo $post_author; ?>
  36. <!--COMMENTS COUNT-->
  37. <i class="fa-comments-o"></i><?php if (!empty($post->post_password)) { ?>
  38. <?php } else { ?><div class="meta_comm"><?php comments_popup_link( __('0 Comment', 'optimizer'), __('1 Comment', 'optimizer'), __('% Comments', 'optimizer'), '', __('Off' , 'optimizer')); ?></div><?php } ?>
  39. <!--CATEGORY LIST-->
  40. <i class="fa-th-list"></i><div class="catag_list"><?php the_category(', '); ?></div>
  41. </div>
  42. <?php } ?>
  43. <!--POST INFO END-->
  44.  
  45. <!--POST CONTENT START-->
  46. <div class="thn_post_wrap">
  47.  
  48. <?php the_content(); ?>
  49.  
  50. </div>
  51. <div style="clear:both"></div>
  52. <div class="thn_post_wrap wp_link_pages">
  53. <?php wp_link_pages('<p class="pages"><strong>'.__('Pages:', 'optimizer').'</strong> ', '</p>', 'number'); ?>
  54. </div>
  55. <!--POST CONTENT END-->
  56.  
  57.  
  58.  
  59. <!--POST FOOTER START-->
  60. <div class="post_foot">
  61. <div class="post_meta">
  62. <?php if( has_tag() ) { ?>
  63. <div class="post_tag">
  64. <div class="tag_list">
  65. <?php if(get_the_tag_list()) {
  66. echo get_the_tag_list('<ul><li><i class="fa-tag"></i>','</li><li><i class="fa-tag"></i>','</li></ul>');
  67. }
  68. ?>
  69. </div>
  70. </div>
  71. <?php } ?>
  72. </div>
  73. </div>
  74. <!--POST FOOTER END-->
  75.  
  76. </div>
  77. <!--POST END-->
  78. </div>
  79.  
  80. <?php endwhile ?>
  81.  
  82. <?php endif ?>
  83.  
  84. <?php if (!empty ($optimizer['post_nextprev_id']) || is_customize_preview()) { ?>
  85. <!--NEXT AND PREVIOUS POSTS START-->
  86. <?php if ( get_post_status ( get_the_ID() ) !== 'private' ) { ?>
  87. <?php get_template_part('framework/core','nextprev'); ?>
  88. <?php } ?>
  89. <!--NEXT AND PREVIOUS POSTS END-->
  90. <?php }?>
  91.  
  92.  
  93. <!--COMMENT START: Calling the Comment Section. If you want to hide comments from your posts, remove the line below-->
  94. <?php if (!empty ($optimizer['post_comments_id']) || is_customize_preview()) { ?>
  95. <div class="comments_template <?php if (empty($optimizer['post_comments_id'])){ echo 'hide_comments'; }?>">
  96. <?php comments_template('',true); ?>
  97. </div>
  98. <?php }?>
  99. <!--COMMENT END-->
  100.  
  101.  
  102. </div>
  103. </div>
  104.  
  105. <!--SIDEBAR START-->
  106. <?php get_sidebar(); ?>
  107. <!--SIDEBAR END-->
  108.  
  109.  
  110.  
  111. </div><!--center class END-->
  112. </div><!--#content END-->
  113. </div><!--layer_wrapper class END-->
  114.  
  115. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement