Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums Help & Support categories
Akaleez
Posted on 21 Aug 2010, 11:43:52

Access: Member
Total Posts: 19
Joined: 2010-07-22

When I click the link on my categorie

http://blog.akaleez.co.uk/?cat=Freebies is does not just show the posts in cat freebies it shows all of the posts as well as the freebies, any idea why?

Thanks.
#2788
Chris
Posted on 25 Aug 2010, 17:27:05

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Have a look at this page which explains how to make categories work that way.

http://network-13.com/thread/1941#1942
#2798
Akaleez
Posted on 25 Aug 2010, 21:09:59

Access: Member
Total Posts: 19
Joined: 2010-07-22

Yeah, thats what I followed from the start. Still showing other posts.

Could it be because I have asked for 3 posts per page so when 3 freebie posts are on one page then 2 on another so to be the third its another different post? possible problem?
#2806
Chris
Posted on 25 Aug 2010, 21:36:45

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

The problem is that on the first page, it shows only articles assigned to the freebies category, which is good, problem is when you view page 2, notice when viewing page 2 that the URL no longer has ?cat=Freebies, so the system doesn't know to show only those articles, to fix that add this variable before your include

Code:
$linkprefix = 'cat=Freebies&';


So it should look something like this

Code:
<?php
// any other code you have
$linkprefix = 'cat=Freebies&';
include 
'news/index.php';
?>
#2807
Akaleez
Posted on 26 Aug 2010, 10:11:15

Access: Member
Total Posts: 19
Joined: 2010-07-22

Thank you very much. That worked.

Only problem is at the bottom for my old news its now showing just the freebies not the other old news.

http://blog.akaleez.co.uk/
#2815
Last edited by Akaleez at 2010-08-26 10:16:35 Reason:
Chris
Posted on 26 Aug 2010, 11:45:39

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Try this code instead

Code:
<?php
if($_GET['cat']){
    
$cat = array();
    
$cat[] = $_GET['cat'];
    
$linkprefix = 'cat=' . $_GET['cat'] . '&';
}
include 
'news/index.php';
?>
#2816
Akaleez
Posted on 26 Aug 2010, 12:00:42

Access: Member
Total Posts: 19
Joined: 2010-07-22

That seems to be working. Thanks.
#2817
Network-13.com © 2013