Advertisement
Guest User

Untitled

a guest
Aug 1st, 2016
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.44 KB | None | 0 0
  1. <?php
  2. /*
  3. * The loop that displays posts.
  4. */
  5. ?>
  6.  
  7. <?php if ( ! have_posts() ) : /* If there are no posts to display */ ?>
  8. <h1><?php _e('Không tìm thấy', 'kimanh'); ?></h1>
  9. <p><?php _e('Xin lỗi, không có kết quả nào tìm thấy cho các kho lưu trữ được yêu cầu. Có lẽ tìm kiếm sẽ giúp tìm thấy một bài liên quan.', 'kimanh'); ?></p>
  10. <?php get_search_form(); ?>
  11. <?php endif; ?>
  12.  
  13. <?php while ( have_posts() ) : the_post(); /* Start the Loop */?>
  14.  
  15. <?php /* How to display posts in the Home Page. */?>
  16. <?php if ( is_front_page() ) : ?>
  17. <div class="post">
  18. <div class="post_image"><a href="<?php the_permalink() ?>"><?php the_post_thumbnail( 'post-image', array('class' => 'shadow') ); ?> </a></div>
  19. <h2 class="post_title replace" ><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Liên kết tới %s', 'kimanh'), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
  20. <div class="clearfix"><?php the_content(); ?></div>
  21. </div>
  22.  
  23. <?php /* How to display posts in the Blog Post Page. */?>
  24. <?php elseif ( is_home() ) : ?>
  25. <div class="post">
  26.  
  27. <?php if ( of_get_option('pkb_post_img') == '1') {
  28. if ( (has_post_thumbnail() && function_exists('has_post_thumbnail'))) { ?>
  29. <div class="post_image"><a href="<?php the_permalink() ?>"><?php the_post_thumbnail( 'post-image', array('class' => 'shadow') ); ?> </a></div>
  30. <?php } } ?>
  31.  
  32.  
  33.  
  34.  
  35. <h2 class="post_title" ><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Liên kết tới %s', 'kimanh'), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
  36.  
  37. <?php if ( of_get_option('pkb_comment_counter') == '1') { ?>
  38. <div class="post_meta"><em><?php pkb_posted_on(); ?></em> <a href="<?php the_permalink(); ?>" class="comment_count"><?php comments_number('0','1','%'); ?></a> </div>
  39. <?php } ?>
  40. <div class="clearfix"><?php the_excerpt(); ?></div>
  41. <ul class="meta clearfix">
  42. <?php pkb_posted_in(); ?>
  43. </ul>
  44. <hr />
  45. </div>
  46.  
  47. <?php /* How to display posts in Archive Page or Search Page. */ ?>
  48. <?php elseif ( is_search() || is_archive() ) : ?>
  49. <div class="post">
  50. <h4 class="post_title" ><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Liên kết tới %s', 'kimanh'), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h4>
  51. <div class="post_meta"><?php pkb_posted_on(); ?></div>
  52. <div class="clearfix"><?php the_excerpt(); ?></div>
  53. <hr class="thin"/>
  54. </div>
  55.  
  56. <?php /* How to display Display all other posts. */ ?>
  57. <?php else : ?>
  58. <div class="post">
  59. <h2 class="post_title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Liên kết tới %s', 'kimanh'), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
  60. <div class="post_meta"><em><?php pkb_posted_on(); ?></em> <a href="<?php the_permalink(); ?>" class="comment_count"><?php comments_number('0','1','%'); ?></a> </div>
  61. <div class="clearfix"><?php the_content( __( 'Tìm hiểu thêm &rarr;', 'kimanh' ) ); ?></div>
  62. <ul class="meta clearfix">
  63. <?php pkb_posted_in(); ?>
  64. </ul>
  65. <hr />
  66. </div>
  67. <?php endif; ?>
  68.  
  69. <?php endwhile; /* End the loop. */ ?>
  70.  
  71. <?php if (function_exists("pkb_pagination")) { /* Display navigation to next/previous pages when applicable */
  72. pkb_pagination();
  73. } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement