Hi,
I have just started using this and have encountered a problem that I can't work out how to fix. I've posted a test article and created categories that I need. The article is ment to display in one category which I've called "index" (the category is named index). However, it seems to be displaying in two two places yet it's only set to index.
Is there something I'm doing wrong, and do you need any more information?
Can you show me the code you're using to display your articles?
Chris wrote at 2012-03-22 22:00:28
Can you show me the code you're using to display your articles?
I believe you mean this?:
<div id="content">
<?php
$cat[] = 'about';
include 'news/index.php';
?>
</div>
Are you sure you haven't accidentally assigned an article to multiple categories?. Another possible reason may be this, take the following code
<?php
$cat[] = "about";
include 'news/index.php';
?>
Will display all articles assigned to the about
category unless there are no articles assigned to it, in that case it will display all news articles instead. Perhaps this is what's happening?
I definitely haven't assigned an article to multiple categories.
Then I tried making a test article and putting it in the about page, because you said that could be the issue. However, after selecting the "about" category, it's put it into the guides section and not the about section. What I mean is, it's in http://www.example.com/guides.php and not http://www.example.com/about.html.
Is this because the about page is not php?
Hopefully some of that information above can help you understand this problem.
The naming of the files isn't important, all that matters is the code you're using. Can you show me the code you're using for both the guides.php
file and the about.html
file?
<div id="content">
<?php
$cat[] = 'guides';
include 'news/index.php';
That's the code in the guides part.
I don't have any PHP in the about.html section. o.o
I presume that's one of the problems, lol.
Without seeing the site for myself I can't really figure this out. You said an article is showing in 2 places even though it's assigned to the about
category. What are the 2 places it's showing?
Chris wrote at 2012-03-23 16:47:08
Without seeing the site for myself I can't really figure this out. You said an article is showing in 2 places even though it's assigned to the
about
category. What are the 2 places it's showing?
Alright I'll explain.
I'm using test.php - which will be my index, I'm just testing php with it atm. So basically test.php is my index. I'm also using guides.php as my second test. Just said that so you know.
Ok. It's showing in two places, it's showing in the guides and test section. However, in the www.example.com/news/admin.php, the article category is set to index (index is test.php). The problem I have is that it's showing in the Guides.php AND test.php pages, and not just the test.php. :s
Hope I explained well enough.
Fixed the issue!
Didn't know that if no articles were assigned to it, it'd show on all pages. Thanks for the help.