Support » Plugins » Hacks » links widget – add a divider between each link

  • Sean


    I’ve added the links widget to a non-sidebar area (for lack of a better term — I’m pretty new to the WordPress platform) that displays links for a specific category and limits the count to 12. Basically, I publish a PDF document once a month and want the link to the PDF displayed in this list and limiting it to only the previous 12 months.

    I’ve figured out how to style the category name, but I want to add a divider between each link in the list.

    <div class="divider> </div>

    This is the php code I’m using for this purpose:

    function widget_links_args_filter($args) {
    	$args['order'] = 'DESC';      // descending
            $args['limit'] = 12;
    	return $args;
    the_widget('WP_Widget_Links', 'category=26', 'before_title=<h5>&after_title=</h5>');

    Will someone please help me with this? Gracias!

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’m not 100% positive if this is what you’re after, but you wanted to use css to divide each item you could break it up with an unordered list. Just a ul and an li. Then the border-style css element could separate the li items.

    Hope that helps!



    Hi munrobr,
    Well, yes… that’s essentially what I’m after. My “divider” class is defined in css. I just need to know how to add it to this php function. I want it done automatically when I add the links in the blogroll. I don’t want to have to go and manually make the change every time I publish my PDF.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘links widget – add a divider between each link’ is closed to new replies.