PDA

View Full Version : Display one category on home page


sithaaraa
04-12-2007, 11:52 AM
Hi
I have setup 3 categories that is sports, world news, and reports?.I want show world news category's news in home page not other two?.so wat I have to do?
________
Child Wellbutrin (http://www.classactionsettlements.org/lawsuit/wellbutrin/)

utvara
04-12-2007, 01:29 PM
Find the following php code in index.php (around line 562)

$article_list = new Article_list();
$article_list->search(array('a.status' => 1, 'a.created' => $cur_date, 'a.featured_news'=> '0' ), 'order_desc', 'descending', $latest_news_number, 0);


What you should do is to add filter for categoriy/categories, something like this:

$article_list = new Article_list();
$article_list->search(array('a.cid' => '1', 'a.status' => 1, 'a.created' => $cur_date, 'a.featured_news'=> '0' ), 'order_desc', 'descending', $latest_news_number, 0);


The important part is 'a.cid' => '1'

for more details refer to http://www.vivvo.net/forums/showthread.php?t=674

Tobes
09-12-2007, 05:53 PM
is there a way I can display two catagories on my index.tpl

I want this where latest news is displayed on the center of the home page, to be able to add another catagorie in the 2nd column.

like i have illistrated in the picture attached

many thanks for your time.

Toby

clawzeeb
11-08-2007, 10:03 PM
Good question Tobes! I also want to know how to display like 3 different categories on site's index with their latest 5 posts in descending order.

Thanks!