Support » Fixing WordPress » wp_get_bookmarks help

  • wyclef

    (@wyclef)


    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'); ?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • esmi

    (@esmi)

    Forum Moderator

    wyclef

    (@wyclef)

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

    esmi

    (@esmi)

    Forum Moderator

    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. 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘wp_get_bookmarks help’ is closed to new replies.