Grow your CSS skills. Land your dream job.

How to display WordPress links without using an unordered list structure?

  • # March 26, 2013 at 2:14 am

    Hi

    I know that wordpress has removed the links feature but there is a plugin which does exactly the same thing. At the moment, I can display links like this:

    < ?php wp_list_bookmarks(); ?>

    Is there a way to display these in a different way, something like:

    link

    description of the link

    thanks

    # March 26, 2013 at 4:15 pm

    Just curious, are you wanting it to print out as paragraphs because of a styling issue? Semantic issue?

    # March 26, 2013 at 4:25 pm

    http://codex.wordpress.org/Function_Reference/wp_list_bookmarks

    Should be able to override the default parameters for category_before and category_after. Something like:

    < ?php wp_list_bookmarks(' category_before=

    &category_after= ‘); ?>

    # March 27, 2013 at 5:17 am

    I wanted to change the structure of how the links display. This is how I am doing it

    # March 27, 2013 at 5:21 am

    $links = get_bookmarks();

    foreach ($links as $key) {
    echo “

    link_url . “”>” . $key->link_name . “

    “;
    if ($key->link_description) {
    echo “

    ” . $key->link_description . “

    “;
    }
    }

    I know I might have some problems with the inverted commas but thats jus because these (‘) interfered with the markdown code

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".