I have a WordPress sidebar on my site that works fine on an old version of PHP, but now on production, the page will not load. This is caused by incorrect formatting of the line below, which is flagging an error due to Unparenthesized a ? b : c ? d : e
not being supported.
This is the line:
$taxonomy = get_the_terms($post->ID, is_singular('post') ? 'category' : is_singular('blog') ? 'category' : is_singular('event') ? 'category' : 'vacancy_category');
I have tried multiple formats of the parenthesis to no avail. Any advice would be greatly received.