tomasi514
Member
Posted 2 years ago #
Here is the page I have:
http://www.website.com/?page_id=33&category=77
I want to make a condition on category 77, here is what I am doing:
if (is_category('77'))
{
}
or even:
if (is_page('33') && (is_category('77')))
{
}
It seams to return false all the time, can someone help me here?
Pages don't have categories.
tomasi514
Member
Posted 2 years ago #
Thanks for help t31, yet we can have such url sometimes, when using plugings like wp ecomm.
Any answer please?
Shouldn't your URL then be..
yoursite.com?page_id=33&cat=77
tomasi514
Member
Posted 2 years ago #
All right, no t31, thanks for the remark.
Categories seam not to be the same in wp eCommerce.
Can anyone help here please?
I think what you want is:
if ( isset($_GET['category']) && (77 == $_GET['category']) )
{
}
tomasi514
Member
Posted 2 years ago #
Works just fine!
Thanks a lot vtxyzzy!