Menu items to appear only if user is logged id
-
I have created a couple of pages that I would like to show up in a separate menu only if the user is logged in. I tried searching but couldn’t find anything (then again I am not entirely sure what to search for) I have excluded those pages from my main page menu, i.e.
<?php wp_list_pages('exclude=8,12'); ?>
Is is possible to have a second wp_list_pages this time including 8 and 12, but wrapped with an if statement? In English, what I want is “if the user is logged in, then show links to pages 8 and 12, otherwise, show nothing.” If so, what would that if statement look like in PHP?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Menu items to appear only if user is logged id’ is closed to new replies.