fruktkak
Member
Posted 1 year ago #
Hello, Im tryin to make a menu for login. Just the login button. I want it exactly as it is now, just with only the Login page.
This is my menu now:
<div id="topleft">
<ul id="menu">
<li<?php if(!is_page() ) { ?> class="current_page_item"<?php } ?>><a href="<?php bloginfo('home'); ?>">Home</a></li>
<?php wp_list_pages('sort_column=post_date&title_li='); ?>
</ul>
</div>
What i want is just one of the page to show in the menu. One named: Login
The link for the Login page is http://ddddddddddd/?page_id=149
Thank you
fruktkak
Member
Posted 1 year ago #
I am currently using the "Theme My Login" plugin. My theme does not allow any widget so i am creating this menu.
If your theme doesn't support custom menus, then I would just add this <li><a href="http://www.yoursite.com/wp-login.php">LOGIN</a></li> before the final </ul> and you can create a manual link.
fruktkak
Member
Posted 1 year ago #
Yeah, i have tryed those, the problem is that. I do not want a big login button, i want a button that is pretty much hidden from the site. Like the 1 i mentioned. Isnt there any1 that have any1 idea about the code?
fruktkak
Member
Posted 1 year ago #
If i add that link to the code. Doesnt the other pages popup also? What do i need to remove from the code?
My bad - I didn't realise you only wanted that one page?
<div id="topleft">
<ul id="menu">
<li><a href="http://www.yoursite.com/wp-login.php">LOGIN</a></li>
</ul>
</div>
fruktkak
Member
Posted 1 year ago #
^^ Thank you, it was almost as i wanted it. But i'll do :P Since theres a page the login button changes from Login to logout when you login. Now it doesnt, and the colour of the button is white, not orange, as it supposed to be.
Glad it's helped somewhat :) I've added a tag for Theme-my-login to the thread, so hopefully the developer will see it as a support question.
fruktkak
Member
Posted 1 year ago #
<div id="topleft">
<ul id="menu">
<?php if ( is_user_logged_in() ) : ?>
<li><a href="<?php echo wp_logout_url(); ?>">LOGOUT</a></li>
<?php else : ?>
<li><a href="<?php echo wp_login_url(); ?>">LOGIN</a></li>
<?php endif; ?>
</ul>
</div>
fruktkak
Member
Posted 1 year ago #