wordpress menu link function

I have added the code below to my functions.php to add a "Login" Link to my wp menu.

 $newlink = '<li>' . $args->before . '<a title="Login" href="'. wp_login_url('index.php') .'">' . $args->link_before . 'Login' . $args->link_after . '</a>' . $args->after;

how can i change wp_login_url function to use another page? For example, I'm using the mingle plugin which creates a custom login page.

code below from wp-includes/general-template.php

 function wp_login_url($redirect = '', $force_reauth = false) {
        $login_url = site_url('wp-login.php', 'login');

        if ( !empty($redirect) )
                $login_url = add_query_arg('redirect_to', urlencode($redirect), $login_url);

        if ( $force_reauth )
                $login_url = add_query_arg('reauth', '1', $login_url);

        return apply_filters('login_url', $login_url, $redirect);


I would not recommend changing the core code of WordPress as you will likely break the install.

Can you not just update your functions.php file line of code to be something like:

 $newlink = '<li>' . $args->before . '<a title="Login" href="/login/">' . $args->link_before . 'Login' . $args->link_after . '</a>' . $args->after;

Need Your Help

MS-DOS Batch file to count occurrences

windows batch-file

I have a plain text file like this:

How to Enforce Width on Element with Border?

html css css3 twitter-bootstrap

I'm using Twitter Bootstrap for my page layout and I want to insert a CSS3 Box Shadow in a column.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.