Support » Plugin: Better archives widget » Post count

Viewing 2 replies - 1 through 2 (of 2 total)
  • The widget function in widget-archives.php:43 gets the post count as a result from the query (on line 59).

    You could do the following:

    <li class="baw-month"><a href="<?php echo get_month_link( $month->year, $month->numMonth ); ?>"><?php echo $month->month; ?><?php echo ' ' . $month->year; ?> (<?php echo $month->post_count; ?>)</a></li>

    I’ve added the following in the above snippet:

    (<?php echo $month->post_count; ?>)

    which will output the post count in parentheses for each month.

    Plugin Author Paul de Wouters

    (@pauldewouters)

    Nice idea. IF you want to submit a pull request https://github.com/pdewouters/better-archives-widget

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Post count’ is closed to new replies.