| Author |
Message |
SolidSnake2003

Joined: 31 Jul 2007 Posts: 54
|
|
Showing Mulitple Categories |
|
Im having problems displaying mulitple categories for an include. I included the master category for one section, but when I tested it, it shows all categories
<?PHP
$number = '5';
$category = '2';
$template = 'home_news';
include("........./admin/show_news.php");
?>
|
|
| Wed Feb 20, 2008 1:54 pm |
|
 |
Guest
|
|
|
Please login to hide the ads.
|
|
|
|
 |
scottdallas

Joined: 04 May 2006 Posts: 1843 Location: US |
|
|
|
well you only have '2' specified.. but you're saying even when you specify '2' it shows more than that category? does it do it on any other categories or just 2? i remember people having trouble with category 2 and 12.. maybe it's just something with the ID
_________________ www.scottdizzle.com uses cnr
last update: 07-22-08: 8:30 pm |
|
| Thu Feb 21, 2008 5:53 am |
|
 |
Mania

Joined: 03 Feb 2007 Posts: 106
|
|
|
| Thu Feb 21, 2008 9:35 am |
|
 |
SolidSnake2003

Joined: 31 Jul 2007 Posts: 54
|
|
|
|
 |  | well you only have '2' specified.. but you're saying even when you specify '2' it shows more than that category? does it do it on any other categories or just 2? i remember people having trouble with category 2 and 12.. maybe it's just something with the ID |
Yes thats exactly right
What it is, 2 is the master category for news, and Ive got different categories as Sub-Categories of that, but when I run the test page, its showing news from another category that Ive checked, and its not a sub-category of the main news
|
|
| Thu Feb 21, 2008 11:25 am |
|
 |
scottdallas

Joined: 04 May 2006 Posts: 1843 Location: US |
|
|
|
There's been so many threads on strange category issues.. it's hard to tell where yours lies. #2 seems to be the most common category to mess up.. or maybe not but I'm just going from my memory here.
So, my recommendation (which isn't really fixing it, just what I would do so I didn't go insane) would be to try creating a new category for 'News' and put all your sub-categories under it.. then change the category in your pages, reupload, and forget about it. I say that cause I know it's kinda annoying to have the id #'s for categories all wacko numbers but sometimes it's just too hard to avoid, that's why it's great we can +/- them up and down now.
_________________ www.scottdizzle.com uses cnr
last update: 07-22-08: 8:30 pm |
|
| Sat Feb 23, 2008 12:39 pm |
|
 |
SolidSnake2003

Joined: 31 Jul 2007 Posts: 54
|
|
Re: Showing Mulitple Categories |
|
 |  |  |  | Im having problems displaying mulitple categories for an include. I included the master category for one section, but when I tested it, it shows all categories
<?PHP
$number = '5';
$category = '2';
$template = 'home_news';
include("........./admin/show_news.php");
?> |
1, this include is not recommended
 |  | include("........./admin/show_news.php"); |
that is correct include
 |  | include $cutepath.'/show_news.php'; |
Read Me please
2. for your problem with category
just replace this in /inc |
I downloaded your file, but its not working for me. Its including the news, but Ive specified the categories, but its still showing news that is not in the specified categories
This is the include Im using
<?PHP
$number = 3;
$category = '1,4,5,6,7,8,9,10,11,12,13,14,15';
$template=home_news;
include $cutepath.'/show_news.php';
?>
Ive just tried including 1 which is the main category, and 4-15 is its subcategories
|
|
| Sat Feb 23, 2008 12:41 pm |
|
 |
|