Recent Topics

1 Nov 23, 2005 14:29    

After the quick help last time I'd like to ask another thing:

When I sort postings in sub-categories, they always show up within the main category. For example, I have categroy A and sub-category A-1, I put an entry into A-1 and if I search within A-1 the posting is there (as it should be). But when I search within A (the main category), ALL postings from ALL sub-categories show up. Can I edit this somehow so that only postings show up which are actually in the main category A and not in the sub-categories?

This is the site in question: http://www.periphel.de/isla/blog/index.php

Let's take the first category - AEOLIA. There are no postings in the main category, but there is a posting in one of the sub-categories. Now if I click AEOLIA, I'd like to have only those postings which are in this category - in this case none. Instead I get all postings from all sub-categories.

rb

2 Nov 23, 2005 16:47

Are you confusing the categories listing and the search box? They don't work together.

The categories listing lets you check one or more categories, and then click the button at the bottom of the list to display only those categories. I tried that on your blog, and it appears to work correctly (when I selected only AEOLIA, there were no posts displayed).

The search box is independent of the category list, and will search all posts in your blog, regardless of what you may have checked above that. If you want to integrate the two (to provide searches limited by category), that can probably be done with some hacking, but it doesn't work that way by default.

3 Nov 23, 2005 16:57

Kweb wrote:

Are you confusing the categories listing and the search box?

No. ^^

I tried that on your blog, and it appears to work correctly (when I selected only AEOLIA, there were no posts displayed).

Ah! I clicked on the link AEOLIA, not on the enter button. So, If I click the link, all entries will show up, but if I click the enter button, only the marked categories show? How interesting. Thank you!

4 Nov 23, 2005 17:08

Ah, yes. That's the difference. I thought maybe you were checking categories and then using the search box (an easy mistake to make). But clicking the link for a category does in fact select all the sub-categories. When the page comes back, you can see that all the sub-categories are checked.

If you would like to change this behavior (so that clicking the category name only selects that one category), you can edit the _categories.php file in the /skins directory. Find the following line:

echo '<a href="'.url_add_param( get_bloginfo('blogurl'), 'cat='.$cat_ID ).'">'.format_to_output($cat['cat_name'], 'htmlbody').'</a> <span class="dimmed">('.$cat['cat_postcount'].')</span>';

Change it to:

echo '<a href="'.url_add_param( get_bloginfo('blogurl'), 'catsel='.$cat_ID ).'">'.format_to_output($cat['cat_name'], 'htmlbody').'</a> <span class="dimmed">('.$cat['cat_postcount'].')</span>';

Disclaimer: I did not test this, but I'm 99% sure it will work.

5 Nov 23, 2005 17:57

Thank you! *_* (I love this community... :D )


Form is loading...