I’m trying to add <i class="icon-ok"></i>
before the content inside the <li>
of the blogroll widget. I’m assuming that’s done through the link_title filter, but I can’t find a suitable explanation as to how.
Any thoughts?
I’m trying to add <i class="icon-ok"></i>
before the content inside the <li>
of the blogroll widget. I’m assuming that’s done through the link_title filter, but I can’t find a suitable explanation as to how.
Any thoughts?
You must be logged in to post a comment.
Filter the arguments for the blogroll:
Explanation
WP_Widget_Links
.wp_list_bookmarks()
with some prepared widget arguments which we can filter withwidget_links_args
.wp_list_bookmarks()
calls_walk_bookmarks()
and passes the original arguments through._walk_bookmarks()
accepts an argument'before'
that defaults to<li>
.widget_links_args
in (2.) and let it fall through until it arrives in_walk_bookmarks()
(4.).Alternative
You could use CSS instead: