You try to make things to complicated ...
In the Categories sidebox if you don't want that showing unless logged in ... note this includes the All, Specials, New and Featured Link ...
You could use an IF on the sidebox itself ...
Find this line in the categories.php sidebox ...
PHP Code:
if ($check_categories->RecordCount() > 0) {
Change to read:
PHP Code:
if ($_SESSION['customer_id'] > 0 && $check_categories->RecordCount() > 0) {
Now, you will see the categories sidebox with links if customer is logged in ... otherwise just see the box only with the links to All, Specials, New and Featured ...
Or, use the same concept to turn off the whole box ...