I want to modify the default widgets
-
Hi,
I’m trying for a long time but couldn’t get what I want.
What I want is to modify the markup of default widgets (Within my theme). Only those widgets which has posts count. For example, the Archives widget.
By default, the Archive widget has markup like this:
<li><a href="archive-link">January 2014</a> (14)</li>
Here the posts count is outside of the anchor tag.
But I want it like this:
<li><a href="archive-link">January 2014 (14)</a></li>
Where the post count is within the same anchor tag which has the archive name and link.
Same to all the widgets like categories and any other widget with post count.
What I have done so far is copy the default archives widget code to my theme and register as another name. Then I have edited the format to custom in wp_get_archives. But it doesn’t work.
Please help anyone.
Thanks in advance!
- The topic ‘I want to modify the default widgets’ is closed to new replies.