I have to highlight some menu products in a different way with respect to the page ID and thus after i call the sidebar up top I've this
<?php if( is_page('my-page') )echo 'my-page';?>
The echo is simply that i can see if it's working... But, it's not. I place the same code in to the primary page template also it results yes I'm on that page. Any reason the sidebar wouldn't work?
From is_page :
Can't Be Used Within The Loop
This tag can be used Prior To The Loop and doesn't work within the Loop
Because of certain global variables being overwritten throughout The Loop is_page() won't work. To be able to utilize it following the Loop you have to call wordpress_query_totally reset() following the Loop.
Maybe for this reason you are going through problems ?