Support » Fixing WordPress » All posts for Month in Sidebar

  • I am wondering if there is a way to display all of the posts for a specific month under it’s respective month in the sidebar. My customer says that Blogger does this and he would like this functionality.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I had actually modified the calendar thing in the sidebar to achieve this functionality.

    This is what I did to the general-template.php file. Just search for thead and you’ll get there.

    	<tr><td align="center" colspan="7"><a href="' .get_month_link($thisyear, $thismonth) . '"> ' . $wp_locale->get_month($thismonth) . ' ' . date('Y', $unixmonth) . ' </a></td></tr>

    I am not sure about the calendar…do I have to ahve that installed?

    <?php echo '<a href="' .get_month_link($thisyear, $thismonth) . '"> ' . $wp_locale->get_month($thismonth) . ' ' . "This Month" . ' </a>' ?>

    This line will give you the current month’s archive page. You aldready have that calendar installed. Its called in the sidebar if you put in these lines:

    <h2><?php _e('Calendar'); ?></h2>
    <?php get_calendar(); ?>

    I modified the wp-includes/general-template.php because the calendar already had the functionality to switch months so all I had to do was change the code a bit to make the month a link.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘All posts for Month in Sidebar’ is closed to new replies.