• Resolved David Calhoun

    (@dpcalhoun)


    I found this forum post about inserting special characters between menu items (http://wordpress.org/support/topic/244544?replies=13#post-1054483), I’d like to figure out how to do the same thing, but with WP_LIST_BOOKMARKS function.

    This is what I’ve tried so far. I have just edited the code from the previous post. It will list the bookmarks correctly, but for some reason doesn’t insert the ” | ” between them:

    <?php
    $links = wp_list_bookmarks('title_li=&categorize=0&sort_column=menu_order');
    
    foreach($links as $i => $page)
    	$links[$i] = '<li><a href="' . link_url($page->ID) . '" title="' . attribute_escape(apply_filters('link_name', $page->link_name)) . '">' . apply_filters('link_name', $page->link_name) . '</a></li>';
    
    echo implode('<span class="divider"> | </span>', $links);
    ?>

    If anyone can help me out, it’d be greatly appreciated. Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adding special characters between bookmark links using WP_LIST_BOOKMARKS’ is closed to new replies.