$post = $wp_query->post;
if (is_home() || in_category(‘celebrity’)) {
echo’Yes’;
} else {
echo’No’;
}
Can you show us the overall function, even if all is ok there, i suspect something is wrong about data type (you can’t call both strings and numbers at same time in general).
Maybe try something like:
if (isset($_POST[“search”]))
(
{
if (is_home() || in_category(‘celebrity’)) {
if{
search =! ”;
echo ‘results found’;
}
echo ‘Yes’;
}
)
Idea behind this code is to find if query is really working or not. From your theme search query.
This code is buggy but, sometimes you have problems betweens strings and table data in php. Querying by a null object doesn’t always work, but querying by a ” object may do the trick.