Add privates pages in navigation menus


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <ul>
  2. <?php
  3. wp_list_pages('depth=1&title_li=0&sort_column=menu_order');
  4. if(current_user_can('read_private_pages')) :
  5. ?>
  6. <li><a href="<?php echo get_permalink(10); ?>">For Authors only</a></li>
  7. <?php endif; ?>
  8. </ul>

URL: http://www.wprecipes.com/how-to-add-privates-pages-in-navigation-menus

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.