• I am interested in making directory of links using the links panel. However my list of links is exceptionally long so I would like to have two functions in my custom page template – one that pulls the whole list and makes the category titles into named anchors using the category id and another that shows only the category titles and are jump links to the category id name within the page.

    Does anyone have any insight on how to do this?

    below is how far I have gotten which isn’t that far…

    <?php wp_list_bookmarks( 'orderby=name&order=ASC&limit=-1&show_description=1&title_before=<a name="cat id" >&title_after=</a> '
    
    ); ?>
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter mkjar

    (@mkjar)

    So I got a little further using some code I found today:
    The code below makes the link categories into jump links (I am using it in my side bar) – now I just have to figure out how to make the category titles into anchors… in the code above…

    <ul><?php
    $taxonomy = 'link_category';
    $title = 'Link Category: ';
    $args ='';
    $terms = get_terms( $taxonomy, $args );
    if ($terms) {
    foreach($terms as $term) {
    if ($term->count > 0) {
    echo '<li><a href="#'. $term->name .'">' . $term->name . ' </a></li>';
    } } } ?>
    </ul>
    Thread Starter mkjar

    (@mkjar)

    I realized I meant giving a ‘name field’ to the category instead of title.
    below:

    <?php wp_list_bookmarks( 'orderby=name&order=ASC&limit=-1&show_description=1&category_before=<a name="HOW_DO_I_MAKE_THIS_WORK_category">&category_after=</a>&title_before= &title_after= ' ); ?>

    but I still can’t make it work with the current code…

    Thread Starter mkjar

    (@mkjar)

    ok now I am trying to replace it with this:

    <ul><?php
    $taxonomy = 'link_category';
    $title = 'Link Category: ';
    $args ='';
    $terms = get_terms( $taxonomy, $args );
    if ($terms) {
    foreach($terms as $term) {
    if ($term->count > 0) {
    echo '<li><a name="'. $term->name .'">' . $term->name . ' </a>
    <ul>
    <?php wp_get_links(title_before=<li>&title_after=</li>&category='. $term->name .'); ?>
    </ul>
    </li>';
    } } } ?>
    </ul>

    But the “&title_after=&category=Blogroll); ?> ” is rendering instead of the links underneath the categories.

    Any Ideas???

    Every post I see discussing this seems to be quite outdated – am I silly for trying to find a solution this way? I just want to be able to have my client be able to simply add links (which will be acting as community profiles) without having to manage a separate plug-in.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘want to make wp_list_bookmarks category names into jump link directory’ is closed to new replies.