pustakakoran

Direktori SuratKabar Menggunakan CATEGORY

Mar 2nd, 2018
70
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $args = array(
  3. 'orderby' => 'name',
  4. 'parent' => 0
  5. );
  6. $categories = get_categories( $args );
  7. foreach ( $categories as $category ) {
  8. echo '<div style="margin:0 0 10px 10px; border: 1px solid #888; float: left; padding:1px; text-align:center;"><a href="' . get_category_link( $category->term_id ) . '"><img src="https://arsipkoran.ga/img/logo/koran-thumb/thumb-' . $category->cat_name . '.png" alt="' . $category->cat_name . '" style="width:180px;height:30px;" /><br/>' . $category->name . '</a><br/> (' . $category->category_count . ' arsip)</div>';
  9. }
  10. ?>
RAW Paste Data