Apollogies first for what is likely a dumb question. I'm new to Wordpress and PHP so I'm already over my head. I am concerned about this part of the code in lists-categories-posts/default.php which checks if there's a result and give an error if not:
if ( count( $this->catlist->lcp_categories_posts) == 0 )
{
$lcp_display_output .= '<li>No results</li>';
}
I just need a different error when there is no result but when in a particular category ('news'). I modified the error code but I'm getting identical result.
if ( count( $this->catlist->lcp_categories_posts) == 0 )
{
if ( in_category( 'news' )) {
$lcp_display_output .= '<li>No news results</li>';
} else {
$lcp_display_output .= '<li>No results</li>';
}
}
I'm trying to filter the error but it doesn't seem to evaluate the category at all. It always falls to the last else
statement.
I really need some help...sigh.