Advertisement
pusatdata

WP: Theme For List/Directory Article Versi 3 (Full)

Jan 25th, 2016
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.69 KB | None | 0 0
  1. Use this theme:
  2. Theme Name: Twenty Twelve
  3. Theme URI: https://wordpress.org/themes/twentytwelve/
  4. Author: the WordPress team
  5.  
  6. Install this plugin:
  7. Prime Strategy Page Navi (https://wordpress.org/plugins/prime-strategy-page-navi/)
  8. Auto Numbering Post (https://wordpress.org/plugins/auto-numbering-post/)
  9. WP-PostViews (https://wordpress.org/plugins/wp-postviews/) >> setingnya: everyone
  10.  
  11. Open file: /wp-content/themes/twentytwelve/index.php
  12.  
  13. Find this code (line 25):
  14. <?php get_template_part( 'content', get_post_format() ); ?>
  15.  
  16. Replace with this code:
  17. <?php if ( function_exists( 'page_navi' ) ) page_navi( 'items=7&prev_label=Prev&next_label=Next&first_label=First&last_label=Last&show_num=1&num_position=after' ); ?>
  18. <?php /* Start the Loop */ ?>
  19. <?php while ( have_posts() ) : the_post(); ?>
  20. <div><a class="judul" href="<?php the_permalink(); ?>">
  21. <?php the_title(); ?></a>
  22. <small><div style="text-indent: 10px;">Oleh: <?php the_tags(' '); ?> | Media: <?php the_category(', '); ?> | Terbit: <?php the_time('l, j F Y'); ?> | Dibaca: <?php if(function_exists('the_views')) { the_views(); }?></div></small>
  23. </div>
  24. <?php endwhile; ?>
  25. <?php if ( function_exists( 'page_navi' ) ) page_navi( 'items=7&prev_label=Prev&next_label=Next&first_label=First&last_label=Last&show_num=1&num_position=after' ); ?>
  26.  
  27. Save file and close.
  28.  
  29. 2. Open file: /wp-content/themes/twentytwelve/style.css
  30.  
  31. In bottom, pasaste this code:
  32.  
  33. /* =Style for Page Navigasi
  34. ----------------------------------------------- */
  35. .page_navi {
  36. text-align: center;
  37. }
  38.  
  39. .page_navi li {
  40. display: inline;
  41. list-style: none;
  42. }
  43.  
  44. .page_navi li.current span {
  45. color: #000;
  46. font-weight: bold;
  47. display: inline-block;
  48. padding: 3px 7px;
  49. background: #fee;
  50. border: solid 1px #fcc;
  51. }
  52.  
  53. .page_navi li a {
  54. color: #333;
  55. padding: 3px 7px;
  56. background: #eee;
  57. display: inline-block;
  58. border: solid 1px #999;
  59. text-decoration: none;
  60. }
  61.  
  62. .page_navi li a:hover {
  63. color: #f00;
  64. }
  65.  
  66. .page_navi li.page_nums span {
  67. color: #fff;
  68. padding: 3px 7px;
  69. background: #666;
  70. display: inline-block;
  71. border: solid 1px #333;
  72. }
  73.  
  74.  
  75. Save file and close.
  76.  
  77. 3. /wp-content/themes/twentytwelve/content.php
  78.  
  79. Tambahkan:
  80. <br/><small><div>Oleh: <?php the_tags(' '); ?> | Media: <?php the_category(', '); ?> | Terbit: <?php the_time('l, j F Y'); ?> | Dibaca: <?php if(function_exists('the_views')) { the_views(); }?></div></small>
  81.  
  82. Tepat di bawah:
  83. <h1 class="entry-title"><?php the_title(); ?></h1>
  84.  
  85. Hapus Metanya tepai di atas:
  86. <?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement