Link to home
Start Free TrialLog in
Avatar of steva
steva

asked on

Disabling the Main Menu for a Certain Page

I know you can disable certain Main Menu items through the Appearance option but I want to disable the entire Main Menu for a certain page: no links at all.  Is there a simple way to do  this?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Edward Jimenez
Edward Jimenez
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of steva
steva

ASKER

Yes, that's the conclusion I reached.  It's not just a certain page I want to do this for, it's that page when it's called from offsite.  So I generate an offsite flag with:

$referer = $_SERVER['HTTP_REFERER'];
if(strpos($referer,['my_site'])) {
	$offsite = false;	// request was not from us
}
else {
	$offsite = true;  // offsite, probably Google
}

Open in new window

Then later in the template when the page is being built:

<?php if ($offsite == true) : ?>
	<style type='text/css'>
		div#nav-container {
		   display:none;
		}
	</style>
<?php endif; ?>

Open in new window