Only show menu tab if on certain page

I’m starting to customize my CSS menu so that it’s dynamic. I only want one of the tabs to show up if the user is viewing essential-oils.php Is there an easy way of determining the page the user is on and making a very simple PHP if statement regarding it?

Thanks!

How is your site set up? Are you using a CMS?

My website is all done from scratch. No fancy CMS. I use html, PHP, sessions and mySQL.

So you cannot create something as simple as this on your own? I’m flabbergasted. Truly.
Might just be me, but one would be doing you a great service if you were forced to do this on your own.
Nothing handed to you on a silver platter.

Awww … it’s not really for us to judge. The answer might be useful to others, too.

OK, I don’t know any PHP really, but wouldn’t a simple if statement do it? Something like

if ($url == "http://mysite.com/essential-oils.php") {
	echo "<li><a>Link</a></li>
}

Maybe I’m wrong, but I’d like to know too. :slight_smile:

Sure, can help once the OP take the inicitive and finds the solution to his problem and actually makes something resembling his needs. Then we can provide more help.

Otherwise, give a man a fish and he eats for a day, teach a man to fish and he eats for the rest of his life.