WordPress.org

Forums

wp_get_bookmarks help (4 posts)

  1. wyclef
    Member
    Posted 5 years ago #

    how can i get links and category titles from the link manager but have the category title in a dt and the links in a dd? I've tried this but it doesn't work...

    <?php wp_list_bookmarks('categorize=0&amp;category_name&amp;category_before=<dt>&amp;category_after=</dt>&amp;=links&amp;before=<dd> &amp;after=</dd>&amp;show_description=0&amp;orderby=url'); ?>

  2. esmi
    Forum Moderator
    Posted 5 years ago #

  3. wyclef
    Member
    Posted 5 years ago #

    get bookmarks seems a lot more complex than list bookmarks? is that the only way to go about removing the ul and li tags?

  4. esmi
    Forum Moderator
    Posted 5 years ago #

    You could run PHP's strip_tags() on wp_list_bookmarks but inserting your own markup in the right place would then be difficult. Another option would be to use str_replace() and substitute each existing piece of markup with your preferred markup but it would take a couple of passes unless you're pretty handy with preg_replace().

    Personally, I'd used get_bookmarks and then loop through the array to create my own output string but each to his/her own, I suppose. :-)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.