WordPress.org

Forums

[resolved] Changing Alt Values of wp_get_archives (3 posts)

  1. brockangelo
    Member
    Posted 8 years ago #

    I am playing around with wp_get_archives and would like to know if it is possible to change the "alt" value of the month link.

    Codex says that we can set show_post_count to true. What I would like to do is hover over the link for, say March 2007, and see an alt that says something like "Humor has 17 posts".

  2. The links it create should not have "alt" attributes. They might have "title" attributes...

    There is no easy way to change the text it produces for those though. There are no filters and such there. So you'd have to edit the core code. The wp_get_archives() function is in general-template.php. Look for where each type of archive sets the $text variable. That's the text that it will produce in the title attribute.

  3. brockangelo
    Member
    Posted 8 years ago #

    Great - thanks for that info.

Topic Closed

This topic has been closed to new replies.

About this Topic