Thread Starter
Mischa
(@anunnaki)
—> Could it be that the_content doesn’t look for the Category?
I have found a nice piece of category code within blog.header.php which basically looks if the variable “cat” has dashes in and if so, it puts the stuff into an array.
I have put this on top (Cat.3 is my blog which shall be excluded on frontpage)
<?php /* Don’t remove this line, it calls the b2 function files ! */
$blog=1;
$cat=”1 2 4 5 6″;
require_once(‘blog.header.php’);
require($abspath.’wp-links/links.php’);
?>
When I display $whichcat, I get:
AND (post_category = 1 OR post_category = 2 OR post_category = 4 OR post_category = 5 OR post_category = 6)
yet the posts with cat=3 still appear on the site…
Hi Anunnaki,
I tried this and it works for me, I’m not quite sure why it isn’t working for you, especially with the SQL being correct!
A couple of tips though:
You can say $cat=’-3′; which will work the same as your example above.
But you may also want to say
if (empty($cat))
$cat=’-3′;
Otherwise you will never be able to display category 3 in that template. I realise this may be ok for you especially if you have another template for that category.
Mike
Thread Starter
Mischa
(@anunnaki)
Thanks much, MikeLittle!
After reading it, I had to smile upon myself not having the idea of “-3” 😉
I really enjoy using WordPress and maybe some time I will even understand what it does inside *ggg*
Anonymous
came across a very interesting website,it appears to be a groundbreaking trilogy film,I think it’s worth checking
http://www.1anunnaki.com