• Resolved 0v3rki11

    (@0v3rki11)


    Is there a way to create just plain HTML links that will invoke/call_to the CTRL+ALT+L function of simplemodal-login?

    I have everything set up and working the way I want it to, including redirects, however I need to put a “login” link in my custom navigation menu for the general visitors to my site.

    Website: Cubicle101.com
    WP Ver: 3.0.1
    Plugins: simplemodal-login & Peter’s login redirect

    http://wordpress.org/extend/plugins/simplemodal-login/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Eric

    (@emartin24)

    The following should do what you are asking:

    <a href="/wp-login.php" class="simplemodal-login">Log In</a>

    Thread Starter 0v3rki11

    (@0v3rki11)

    that does work, but I can’t put in code where I need the Login link displayed.

    I’m wanting to put it in the navigation sidebar widget one the top left of the page. The widget is nothing more than a menu with custom links. The custom menu system will read the link text and place it in the menu but does not link to the login script, it just ends up rewriting the link after saving it into the custom menu system.

    Plugin Author Eric

    (@emartin24)

    You can put the following in your functions.php file:

    function my_login_url($login_url = '') {
    	if (strrpos($login_url, 'redirect_to') === false) {
    		$login_url = esc_url(wp_login_url('http://yourdomain.com'));
    	}
    	return $login_url;
    }
    add_filter('login_url', 'my_login_url');

    Replace 'http://yourdomain.com' with the value you want to use.

    Hope that helps.

    Thread Starter 0v3rki11

    (@0v3rki11)

    ok, s if I drop in…

    function my_login_url($login_url = '') {
        if (strrpos($login_url, 'redirect_to') === false) {
            $login_url = esc_url(wp_login_url('http://cubicle101.com/cubicle101/wp-login'));
        }
        return $login_url;
    }
    add_filter('login_url', 'my_login_url');

    …what’s that gonna get me and where does it need to go in the functions.php file? I’m thumbing through it and not seeing any obvious areas to define it’s placement.

    using…

    <a href="/wp-login.php" class="simplemodal-login">Log In</a>

    is obviously a more elegant solution to the issue but the problem is getting it in the right place. if you can give me a little more insight i’m happy to dive into the code structure head first.

    I have two other issues to try and solve after this one. actually one issue and one request for a future release if the option doesn’t already exist.

    let me know where to drop that last bit of code you posted and i’ll see if it works.

    Hi,

    I installed the simple modal login in wordpress , But its not working.

    Its showing the server internal error . what to do

    Thanks,

    kannabiran

    Thread Starter 0v3rki11

    (@0v3rki11)

    still not resolved

    Plugin Author Eric

    (@emartin24)

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: SimpleModal Login] Links for Menus’ is closed to new replies.