Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-03-11 01:10:58
- coolhat
- Member
- Registered: 2006-03-11
- Posts: 13
Change No. Of Posts Appearing On Front Page
I looked through all the setting that I could find and would appreciate your input on how I can change the no. of posts appearing on my front page. It is currently set to 10posts. I would like to make it the whole month’s posts.
Offline
Re: Change No. Of Posts Appearing On Front Page
You can change the number of posts from 10 to some other number by editing the template that displays your articles, tracking down the <txp:article />
and adding a limit
parameter. To display 25 articles, you’d change it to something like this: <txp:article limit="25" />
.
I don’t think it is easy to get a months worth of posts with the current system.
Offline
#3 2006-03-11 05:23:29
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Change No. Of Posts Appearing On Front Page
You can do: <txp:article_custom month="2006-03" />
However, that won’t update itself automatically to use the current month (you’ll need to update your page by hand). If you want that, then you’d do (off the top of my head, untested):
<txp:php>echo article_custom(array('month' => safe_strftime('%Y-%m')));</txp:php>
Offline
#4 2006-03-11 11:36:53
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Change No. Of Posts Appearing On Front Page
chh_article_custom has more possibilities for defining a time span for displayed articles.
Offline
#5 2006-03-11 20:02:05
- coolhat
- Member
- Registered: 2006-03-11
- Posts: 13
Re: Change No. Of Posts Appearing On Front Page
Thank you. My Webhost’s server is currently down so I will try this out as soon as it comes back live.
Offline
#6 2006-03-12 01:50:20
- coolhat
- Member
- Registered: 2006-03-11
- Posts: 13
Re: Change No. Of Posts Appearing On Front Page
Thanks. Just set the limit to 30 articles. I think this is better than the month idea I was previously thinking about because now it rolls smoothly from month to month unless I add more than 1 article per day, or at the beginning of the month the whole page would have been empty.
Offline