Is there a way to use strpos() with the $haystack converted from an array to a string? My temporary solution was to use in_array() instead, but it is less than ideal:
function dynamic_id() {
$find_str = get_body_class();
if ( in_array( 'single-sfwd-courses', $find_str ) || in_array( 'single-sfwd-lessons', $find_str ) || in_array( 'single-sfwd-topic', $find_str) || in_array( 'single-sfwd-quiz', $find_str ) ) {
echo 'id="jumbo_bg1"';
echo '><style type="text/css">
.jumbotron a.btn {
display: none;
}
</style';
} else {
echo 'id="jumbo_bg"';
}
}
Any help would be much appreciated. Thanks!