Support » Fixing WordPress » Change style of link (bookmark) description

  • How do I change the style on the bookmark item descriptions?

    From what I could find out, that part is not styled at all, so it’s not as simple as changing the CSS.

    Do I have to go and alter the wp_list_bookmarks() function to add a class to the description part and then apply some CSS? I wouldn’t want to mess around with a wordpress function. Everything should be inside the theme.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi farinha,

    I just figured out how to deal with this exact same issue. Basically, you want to find the <?php wp_list_bookmarks('arguments'); ?> part of your sidebar.php and add two parameters: link_after and after. WordPress doesn’t seem to assume you ever want to wrap your link descriptions (since there are no description-specific parameters aside from the one that shows or hides it), but you can do it anyway by using these arguments. link_after is what comes at the end of the link, after is what comes at the end of the whole thing. The description is between those things. So, say you want italicized descriptions on a new line below the link (which is what I did for the site I’m currently working on); you’d do something like this:

    <?php wp_list_bookmarks('title_before=<h3>&amp;title_after=</h3>&amp;category_before=&amp;category_after=&amp;show_description=1&amp;between=<br />&amp;link_after=<i>&amp;after=</i>'); ?>


    My ampersands are all screwed up, but you get the idea.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change style of link (bookmark) description’ is closed to new replies.