wp_list_bookmarks and passing category with variable
-
Hi
For me this was not possible (see title), also the category_name parameter is not working as described. So I found this workaround to list a single link category and call it with ‘$cat_id’, and ‘$title’ is the title of the category:
$output = ''; <li id="Links"><h2><?php echo $title; ?></h2> <ul><?php $bookmarks = get_bookmarks("category=$cat_id"); $output .= str_replace(array('%id', '%class'), array("linkuncat", $class), $category_before); $output .= "$title_before$title_li$title_afternt<ul>n"; $output .= _walk_bookmarks($bookmarks); $output .= "nt</ul>n$category_aftern"; echo $output ?> </ul> </li>
This is an adapted piece of code from bookmark_templates.php. Maybe someone find this useful, it took me two days… ??
I like WP 2.1 and the new category system is great! Thanks to the devs – hope you will fix this bookmarkissue soon.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘wp_list_bookmarks and passing category with variable’ is closed to new replies.