• I have some links to some static pages or other directories on my site. The thing is that I only want users of a certain level to have access to those static pages or directories. Is there any way using the view level plugin that a plugin could be made that will let only logged in users of a certian level have the ability to see those links?
    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • From memory the function: getuserinfo() will return $user_level which can be used to allow/disallow stuff depending on what it is. I may be wrong.

    Thread Starter Tek

    (@tek)

    Yes, but I was wondering if there is a plugin-
    I’m stupid. I don’t know how to program- just fix computers.

    <?php
    getuserinfo();
    if ($user_level > X) { ?>
    Links to static pages
    <?php } ?>

    Thread Starter Tek

    (@tek)

    Oo… I have to try that. Thanks! =)

    indi

    (@indi)

    The function I saw was get_currentuserinfo(). Still not showing up for me, but getuserinfo() doesn’t seem to exist at all.

    I figured out how to do it… we were missing a small peice. It should look like this:

    <?php
    global $user_level;
    getuserinfo();
    if ($user_level > X) { ?>

    Links to static pages
    <?php } ?>

    The “global $user_level;” is important, but I have no idea why. I think it just lets the command know what it’s working with or something. Anyways, that should do it. It worked for me. I’m running wordpress 1.5.2.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Only registerd users can see links’ is closed to new replies.