I want to show custom content if current URL contain certain words.
So far, I'm able to achieve this if the URL contains just the word, 'cart', using the code below. However, I want to be able to check for other words like 'blog', 'event' and 'news'. How do I go about this.
<?php $path = $_SERVER['REQUEST_URI'];
$find = 'cart';
$pos = strpos($path, $find);
if ($pos !== false && strstr($_SERVER['HTTP_REFERER'], 'path/to/site') !== false) :
?>
Custom content
<?php else: ?>
Use an Array and loop through it .. IE