Advertisement
pusatdata

Menampilkan Deskripsi Category and Tags

Oct 13th, 2016
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. Universal:
  2. <h1 class="cattitle"><?php echo single_cat_title(); ?> Archives</h1>
  3. <p class="catdescription"><?php echo category_description(); ?> </p>
  4.  
  5.  
  6. Hanya category dan Tags:
  7. <?php
  8. if ( is_category() ) {
  9. // show an optional category description
  10. $category_description = category_description();
  11. if ( ! empty( $category_description ) )
  12. echo apply_filters( 'category_archive_meta', '<div class="taxonomy-description">' . $category_description . '</div>' );
  13.  
  14. } elseif ( is_tag() ) {
  15. // show an optional tag description
  16. $tag_description = tag_description();
  17. if ( ! empty( $tag_description ) )
  18. echo apply_filters( 'tag_archive_meta', '<div class="taxonomy-description">' . $tag_description . '</div>' );
  19. }
  20. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement