Search Results

Search found 1 results on 1 pages for 'user571188'.

Page 1/1 | 1 

  • Adding a first and last class to Wordpress' widget contents

    - by user571188
    In Wordpress, I'm looking for some way to add a "last" and a "first" class to list items inside Wordpress widgets. The HTML could look like this: <div class="widget-area"> <ul > <li class="widget_recent_comments"> <h3 class="widget-title">Recent comments</h3> <ul id="recentcomments"> <li class="recentcomments">Comment 1</li> <li class="recentcomments">Comment 2</li> <li class="recentcomments">Comment 3</li> <li class="recentcomments">Comment 4</li> </ul> </li> <li class="widget_my_links"> <h3 class="widget-title">My links</h3> <ul id="my-links"> <li class="item">Link 1</li> <li class="item">Link 2</li> <li class="item">Link 3</li> <li class="item">Link 4</li> <li class="item">Link 5</li> </ul> </li> </ul></div> In this example above i'd like to have first/last classes added to the li with "Comment 1", "Comment 4", "Link 1" and "Link 5". Is there an easy workaround for this? (I don't want to do this with javascript) Thank you.

    Read the article

1