Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Check out general-template.php. Two functions wp_get_archives and get_archives_link. You'd have to hack wp_get_archives to change what gets loaded in $text. The post count gets loaded into the $after variable which placed outside the link in get_archives_link. Instead of this:</p> <pre><code>$text = sprintf(__('%1$s %2$d'), $wp_locale-&gt;get_month($arcresult-&gt;month), $arcresult-&gt;year); if ( $show_post_count ) $after = '&amp;nbsp;('.$arcresult-&gt;posts.')' . $afterafter; </code></pre> <p>something like this:</p> <pre><code>$text = sprintf(__('%1$s %2$d'), $wp_locale-&gt;get_month($arcresult-&gt;month), $arcresult-&gt;year); if ( $show_post_count ) $text= $text.'&amp;nbsp;&lt;small&gt;'.$arcresult-&gt;posts.'&lt;/small&gt;'; </code></pre> <p>That's just for the Monthly archive. You'd have to make modifications on the Yearly, Weekly and Daily blocks.</p> <p><strong>Edit:</strong> Easiest way to exclude the <code>&lt;small&gt;</code> element from the link's title is to load it up in a separate variable in each block and then pass it into a modified get_archives_link. In the example above, right after $text gets loaded up just load that value into $title:</p> <pre><code>$text = sprintf(__('%1$s %2$d'), $wp_locale-&gt;get_month($arcresult-&gt;month), $arcresult-&gt;year); $title = $text; if ( $show_post_count ) $text= $text.'&amp;nbsp;&lt;small&gt;'.$arcresult-&gt;posts.'&lt;/small&gt;'; $output .= get_archives_link($url, $text, $format, $before, $after, $title); </code></pre> <p>Then modify get_archives_link:</p> <pre><code>function get_archives_link($url, $text, $format = 'html', $before = '', $after = '', $title = '') { $text = wptexturize($text); if($title == '') $title = $text; $title_text = esc_attr($title); $url = esc_url($url); if ('link' == $format) $link_html = "\t&lt;link rel='archives' title='$title_text' href='$url' /&gt;\n"; elseif ('option' == $format) $link_html = "\t&lt;option value='$url'&gt;$before $text $after&lt;/option&gt;\n"; elseif ('html' == $format) $link_html = "\t&lt;li&gt;$before&lt;a href='$url' title='$title_text'&gt;$text&lt;/a&gt;$after&lt;/li&gt;\n"; else // custom $link_html = "\t$before&lt;a href='$url' title='$title_text'&gt;$text&lt;/a&gt;$after\n"; $link_html = apply_filters( "get_archives_link", $link_html ); return $link_html; } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload