Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Excerpts, Read more, Pagination (http://forum.bytesforall.com/forumdisplay.php?f=20)
-   -   Hiding a category from index : success but posts unreachables (http://forum.bytesforall.com/showthread.php?t=5427)

vil2 Jan 21, 2010 02:49 PM

Hiding a category from index : success but posts unreachables
 
Hello again.

In my blog : http://www.lebardessciences.com I have a glossary category (Lexique, id=30). I do not want it to appear on the index page.
By searching here I found that adding

PHP Code:

<?php if ( !in_category('30') ) { ?>

in ATO (the LOOP section) worked like a charm : all the posts from cat30 were removed from my index. Fine.

Now the problem is : when I clic on this specific category, I can see the list of the posts titles but when I clic on one of them, the post content is missing ! I can only see the comment box.
If you want to check : http://www.lebardessciences.com/category/lexique/

I think this is because of that line I modified in the loop, because if I change
PHP Code:

<?php if ( !in_category('30') ) { ?>

in
PHP Code:

<?php if ( !in_category('XX') ) { ?>

(any number) the problem is solved.

I think I should add something which tells the browser not to display the posts from cat 30 EXCEPTED when I clic on this cat 30. I looked something with is-category('30') but nothing worked so far.

If anyone knows...let me know in turn ;)

OK I searched a little more and I found a post from Juggledad saying that
PHP Code:

<?php if (is_front_page() and !in_category('xx')) { ?>

should be added. So i put this line instead of the first one but nothing worked, and my homepage was full of error messages. Keep searching.

juggledad Jan 22, 2010 04:10 AM

looks like you fixed this. are you set??

vil2 Jan 24, 2010 03:41 PM

Hi,
I just tried the "mcatFilter" wordpress plugin. It worked fine.
However i'm still interested in an easy solution, to improve my knowledge and to get rid of a plugin if I do not really need it. So any advice is welcome ;)


All times are GMT -6. The time now is 08:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.