Advertisement
Guest User

Untitled

a guest
Aug 5th, 2011
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  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>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement