Forums

Login form in sidebar (6 posts)

  1. JohnSawyer
    Member
    Posted 1 year ago #

    Hey i have added login form on my sidebar but when i am logged in you still see the login form how can i fix så when you are logged in you see some links instead of the form. but different links for admin,writers and that.

  2. JohnSawyer
    Member
    Posted 1 year ago #

    no one that can help me?

  3. novice21
    Member
    Posted 1 year ago #

    This would just be a guess really and I'm not entirely sure if this is possible, but if wordpress has a built in way to check and see if a user is logged in then all you need is an if statment to output different code.

    For example I have this code to display something special when the page with id 19 is displaying. It ONLY shows up if you're looking at this page.

    <?php if ( is_page('19') ) { ?>
    [insert html for when page id is 19]
    <?php } else {?>
    [otherwise, use this html]
    <?php } ?>

    see this page for all the conditional tags you can use in wordpress. these would replace the is_page('19')

  4. JohnSawyer
    Member
    Posted 11 months ago #

    im not founding what i should replace is_page('19') with. Can someone help me with that?

  5. epicalex
    Member
    Posted 11 months ago #

  6. charlesleo
    Member
    Posted 2 months ago #

    Just a warning - I'm currently experiencing a 'submit' for non-authenticated users error in Internet Explorer using this script posted by epicalex.

    When a user hits submit on a comment, it triggers a non-logged in user to log into the wordpress screen (exactly what I didn't want.)

    I'm trying to fix it but I'm banging my head against a wall.

Topic Closed

This topic has been closed to new replies.

About this Topic