This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Aug 5th, 2011  |  syntax: None  |  size: 0.81 KB  |  views: 167  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <ul id="links-list">
  2.         <?php
  3.                 $categories = get_categories('type=link');
  4.                 $linklist_out = "";
  5.                 foreach ($categories as $category) {
  6.                         $display_name = $category->cat_name;
  7.                         $display_id = $category->term_id;
  8.                         $display_description = $category->description;
  9.                         $bookmarks = get_bookmarks(array(
  10.                                 'orderby'       => 'updated',
  11.                                 'order'         => 'ASC',
  12.                                 'category'      => $display_id
  13.                         ));
  14.                         $linklist_out .= "<li id='cat-".$display_id."' class='link-cat'><h3>".$display_name."</h3><p>";
  15.                         $linklist_out .= $display_description."</p><ul class='links-list-cat'>";
  16.                         foreach ($bookmarks as $bm) {
  17.                                 $linklist_out .= "<li><a href='".$bm->link_url."' title='".$bm->link_name."'>".$bm->link_name."</a><br />".$bm->link_description."</li>";
  18.                         }
  19.                         $linklist_out .= "</ul></li>";
  20.                 }
  21.                 echo $linklist_out;
  22.         ?>
  23. </ul>
clone this paste RAW Paste Data