• I need to edit the navigation links section and I don’t know which file(s) I have to edit.

    I’m trying to hide one of the links from non logged in users and I found:

    if (is_user_logged_in()) {…}

    Which will do what I want if it is easy enough to implement. Can someone tell me which file to look for and what I’m looking for?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter sulfericacid

    (@sulfericacid)

    No one knows how to do this?

    What navigation links? The menu, or the next/previous post link?

    Also, bumping is against the forum rules, and considered rude. Especially after less than an hour…..

    Thread Starter sulfericacid

    (@sulfericacid)

    The menu itself. Where all the navigation is done. Ie: http://www.ask-a-geek.com . The “private message” link needs to be hidden from everyone unless they are signed in.

    Alright… here’s kind of the pain in the butt. Is that menu just auto generated from your pages?

    Or do you use the custom menu interface?

    There may be a function for omitting pages from the menu if someone is not logged in, I’m not sure.

    On my site when I wanted different links for logged in and not logged in, I registered another nav_menu in functions.php

    Then in header.php I used the is_user_logged_in conditional to display 1 of the 2 menus I had.

    In the menu interface I made a menu appropriate for each

    As I’m sure you know, just hiding the menu item, doesn’t keep anyone from accessing the page. If it’s important to you to keep it hidden, there are membership plugins to keep people from accessing the page who aren’t logged in

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Where are the navigation links stored in the code?’ is closed to new replies.