Login/register form is gone.

This topic contains 8 replies, has 2 voices, and was last updated by  thebirdiemachine 8 years, 9 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #42094

    thebirdiemachine
    Expired Member
    Post count: 246

    I don’t know if this happened during the last update or when I updated X theme, but I no longer have the login/register form.

    How can I get this back/re-install it?

    Thanks
    Stacey

    #42136

    Paolo
    Site Admin
    Post count: 31206

    please see image attached and let us know.

    Thanks

    #42164

    thebirdiemachine
    Expired Member
    Post count: 246

    Hi Paolo,

    At first I was quite surprised to see your screenshot.

    There is definitely a problem though. When I went to the site I was still logged in – I click on log out and get a 404 error – see screen shot.

    Then I cleared my cache and went back to the site – all links were in place and I clicked on login (and did register too) and got to the signin/register form. I Entered my credentials and I was signed in – good. Then I tried to log out again and again got the 404 error. I can’t log out. To “reset” things again I have to clear the cache.

    So something is messed up.

    Thanks
    Stacey

    PS I do not know if this is related (maybe I should open another post) but when you go to the home page – the home page map is not spanning the width of the window/screen – it is chopped off on the left hand side. Then when you scroll just a little bit down (map is still in full view) the map jumps to the left, but then the map has a margin on the right hand side of the screen. Map width widget is set to 100%

    #42255

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    I see that you hidden the logout link of the LoginBox widget. If I make it appear again and click on it, it works. That is the only logout link provided by our plugin.

    The logout link in the top menu seem like a static thing you added. In fact it shows even when I’m not logged in. Without passing a wp_nonce value it will never work.

    The log out link should be added dynamically with code.

    Here you can read more about this: https://wpgeodirectory.com/support/topic/add-menu-item-after-geodirectory-menu-items/

    Your map wasn’t set at 100%, it was set at 1400px.

    Thanks

    #42512

    thebirdiemachine
    Expired Member
    Post count: 246

    Hi Paolo,

    I have not hidden the logout link on purpose – this must have happened – somehow – during the last update because before the last update things were working fine (except for the logout link always being visible (static) which I can’t figure out how to fix).

    Originally I was using Theme My Login Plugin for sign up / sign in etc. because the GD Plugin did not allow users to make their own password or have reCatptcha. It worked fine until a GD few updates ago and then it stopped working so I uninstalled it and went to the GD Plugin as the PW & reCaptcha issues were solved/updated.

    Can you help me “get back the logout link” so users can logout and not get the 404 error?

    I have read the thread you provided (thank you for this) and it is beyond my capability right now.

    Simone forwarded this code to me – but I was unsure where to put it – functions.php?? or somewhere else?

    
    
    <?php if ( is_user_logged_in() ) {
    
    ?>
    <a href="/blog-the-hydrant/">Our Blog: The Hydrant</a> |
    <a href="/wp-logout.php?action=logout&redirect_to=http://www.muttmaps.com/" class="/wp-logout-url">Log Out</a>
    
    <?php } 
    
     else {
    ?>
    <a href="/blog-the-hydrant/">Our Blog: The Hydrant</a> |
    <a href="/?geodir_signup=true&page1=sign_up/" class="wp-login-url">Log In</a> 
    <a href="/?geodir_signup=true&page1=sign_up/" class="wp-register-url">Register</a> 
    <?php
    }
    ?>

    Cheers,
    Stacey

    #42559

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    you just need 1 line of code in your functions.php: https://wpgeodirectory.com/support/topic/add-menu-item-after-geodirectory-menu-items/#post-28565

    Just follow instructions here.

    Thanks

    #44964

    thebirdiemachine
    Expired Member
    Post count: 246

    So I am trying to fix my Login and tried this and broke the site…any advise? Trying to get the Logout link to only appear when a user is signed in and to let the user properly logout instead of getting a 404 error.

    
    
    add_filter('wp_nav_menu_items', 'wp_login_logout', 10, 2);
    
    function wp_login_logout($items, $args) {
    if($args->theme_location =='topmenu'):
    
    if (is_user_logged_in()) {
    $items .= '<li><a href="'. wp_logout_url() .'">Log Out</a></li>';
    } else {
    $items .= '<li><a href="'. wp_login_url(get_permalink()) .'">Log In</a></li>';
    }
    return $items;
    endif;
    
    return $items;
    }
    #45050

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    where did you get that functions from?

    I hope you realize that we can’t debug members custom code or snippets taken from the internet, especially if they are not related to our plugin.

    I can move this in the jobs section of the forum if you wish.

    Thanks

    #45066

    thebirdiemachine
    Expired Member
    Post count: 246
    This reply has been marked as private.
Viewing 9 posts - 1 through 9 (of 9 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket