I'm trying to use a conditional statement to check if either of two words (blog & news) appear in the slug. If one shows up I will display one menu, if the other then its corresponding menu shows.
Using PHP:
$url = $_SERVER["REQUEST_URI"];
$isItBlog = strpos($url, 'blog');
$isItNews = strpos($url, 'news');
if ($isItBlog!==false)
{
//url contains 'blog'
}
if ($isItNews!==false)
{
//url contains 'news'
}