I have a conditional statement in php, when I add an OR logical operator it doesn't work as intended, in the below example it returns the code that I am trying to prevent it doing.
Individually each statement works just not when they are together as I have them below. It seems inefficient to repeat the code for each condition.
if (!is_sp_post_type('profile') || !is_category(array('previews','reviews')) || !is_single(array('previews','reviews'))) {
//do stuff
};
I have read this answer Is there a short-circuit OR in PHP that returns the left-most value? but I'm still stuck