Opened 20 years ago
Closed 19 years ago
#3371 closed enhancement (duplicate)
Request for additional $before and $after parameters to wp_list_bookmarks()
| Reported by: | vdzhuvinov | Owned by: | westi |
|---|---|---|---|
| Priority: | low | Milestone: | |
| Component: | Template | Version: | 2.0.5 |
| Severity: | trivial | Keywords: | |
| Cc: | Focuses: |
Description
Listing template functions such as get_archives() or get_links()
normally include parameters to include custom HTML code before or after
the listed items.
I need a $before parameter because certain browsers still have poor
support for the CSS :before directive and such a feature would
circumvent this problem.
[suggestion initially posted on the wp-hackers list]
Change History (8)
#4
@
20 years ago
- Owner changed from to
- Status new → assigned
We can easyily add wp_list_bookmarks alike $before and $after support to wp_list_categories in trunk (wp_list_cats is deprecated).
However, for now you may be able to get what you want by adding style=none to the arguments for the function call.
The before and after li tags are toggled by this:
http://trac.wordpress.org/browser/trunk/wp-includes/category-template.php#L231
if ( $title_li && 'list' == $style )
$output = '<li class="categories">' . $r['title_li'] . '<ul>';
And
http://trac.wordpress.org/browser/trunk/wp-includes/category-template.php#L250
if ( $title_li && 'list' == $style )
$output .= '</ul></li>';
I'll add the before and after support to my todo list.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Please look at the code in trunk (2.1) as some work as been done in wp_list_bookmarks which I think relates, but I am a novice. Does this relate to ticket:3361 ?