Running EE 3.5.15
I am trying to show content based on URL segment and the following is not working correctly:
{if "{segment_2}" != "portfolio" || "{segment_2}" != "photos"}
<p>Conditional content.</p>
{/if}
If I use one of the conditionals by itself it works correctly, but when I introduce the OR into it, it fails.
I have tried the following:
{if "{segment_2}" != "portfolio" OR "{segment_2}" != "photos"}
and
{if segment_2 != "portfolio" || segment_2 != "photos"}
I have also tried it with single quotes.
Any suggestions on this elementary issue will be appreciated.