WordPress.org

Forums

wp_list_bookmarks and passing category with variable (2 posts)

  1. groovyKimo
    Member
    Posted 8 years ago #

    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.

  2. asamuels
    Member
    Posted 8 years ago #

    SO are you saying that we have to do this and the new linking structure between link category and category pages doesnt work??

    I started a thread on my same issue here:

    http://wordpress.org/support/topic/106149?replies=8

Topic Closed

This topic has been closed to new replies.

About this Topic