WordPress.org

Support

Support » Plugins and Hacks » Hacks » Adding tags between the image and link in wp_list_bookmarks()

Adding tags between the image and link in wp_list_bookmarks()

  • I’m using the wp_list_bookmarks() function to create a supplier resource page. Some of the links will have logos, some will not. To keep the list clean, I’d like to wrap the images that are output in <dt> tags and the link/descriptions in <dd> tags. However, none of the arguments available allow me to insert text between the image and text in the anchor tags. I’ve pasted my altered code here. It works, but I obviously don’t want to change the original file. (The code is from the function _walk_bookmarks, which is then used by the function wp_list_bookmarks(). They’re both in bookmark-template.php in the wp-includes folder.)

    This answer involving filters seems to be what I need, but I don’t know PHP well enough to apply it.

    If anyone has an idea how to filter it or, failing that, a way to make it a separate function that I can use, I’d appreciate it.

    Thanks,
    Scott

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Adding tags between the image and link in wp_list_bookmarks()’ is closed to new replies.
Skip to toolbar