Plugins & Hacks

How can I show only entries from the current month on my main page?

Scenario:
"The number of times I post per month varies a lot but I only want to display the blog entries from the current month on my front page."

Solution:
Hack the index.php page!

Original forum thread (thanks, moraes!):
http://forum.nucleuscms.org/viewtopic.php?t=4293

Method:

  1. Open your index.php. You will find this line:

    include('./config.php');
  2. Add these lines after it:
    $thismonth = date("Y-m", time());
    $archive = $thismonth;
  3. Save it (or maybe save it with other name) and then call this page. It will show the current month items.
section: Plugins & Hacks | submitted by Leng on 2005.Apr.24 | 3792 views

item rate
Total votes: 6 - Rating: 6.83

Please tell us how useful this answer was to you (0 = useless, 10 = very very helpful):

10