wp_get_archives: Put span inside anchor tags
I know how it is possible to wrap HTML around anchor elements with the inbuilt arguments for wp_get_archives
. Is there a way to alter the content of the anchors in order to add a wrapping span for the anchor text?
The intention is to use it for a list of yearly archives on a category (i.e. an automated list of years for which posts exist).
Before:
ul
lia href="xx"2014/a/li
lia href="xx"2015/a/li
lia href="xx"2016/a/li
/ul
After:
ul
lia href="xx"span2014/span/a/li
lia href="xx"span2015/span/a/li
lia href="xx"span2016/span/a/li
/ul
Topic wp-get-archives Wordpress
Category Web