XF 2.0 Hide "New Posts" and "What's New" to guests

cdub

Well-known member
I have a private forum so those links bring up blank pages for guests anyways. How do I hide them for guests?
 
/admin.php?navigation/whatsNew/edit
Display condition: {$xf.visitor.user_id} > 0

/admin.php?navigation/newPosts/edit
Display condition: ({$xf.options.forumsDefaultPage} != 'new_posts' && {$xf.visitor.user_id} > 0)
 
/admin.php?navigation/whatsNew/edit
Display condition: {$xf.visitor.user_id} > 0

/admin.php?navigation/newPosts/edit
Display condition: ({$xf.options.forumsDefaultPage} != 'new_posts' && {$xf.visitor.user_id} > 0)

Thanks! I tried that and unfortunatley this doesn't work. The id of the unregistered users is 1. Is there something which I missed?
 
Last edited:
I tried in /admin.php?navigation/whatsNew/edit
{$xf.visitor.user_id} == 1
and it work (for usergroup 1 [Guests - Unregistered / Unconfirmed])
but if you know the URL then it shows the results

In /admin.php?navigation/newPosts/edit add
{$xf.options.forumsDefaultPage} != 'new_posts' && {$xf.visitor.user_id} == 1
 
I know that I'm in late, but can be useful for someone else also:
Go to Setup - Public Navigation - What's New - Display Condition
and add this:
Code:
$xf.visitor.user_id > 0
 
Top Bottom