I have gotten a few requests from people that would like to add a top login to a Thesis based website. I wanted to make this as easy as possible so with only 1 file upload, a few lines of code to custom_function.php and custom.css and you will have a working top login. I separated the actual login code into it’s own file so your custom_functions.php doesn’t get too out of hand. I have provided a zip file download available at the bottom of this post.
If all goes well your top menu should turn out like this.
The file that you will need to upload is cus_login.php
The code that will be added to your custom_functions.php is as follows:
function custom_top_login() {
require_once (THESIS_CUSTOM . '/cus_login.php');
}
add_action( 'thesis_hook_before_header', 'custom_top_login', 1);
Then to give it some style add the following to your custom.css
#loginform { border: 1px solid #DDDDDD; height: 18px; padding: 4px 0;font-size: 1.2em}
#loginform .user, #loginform .password, #loginform .remember, #loginform .submit, #loginform .welcomebk {margin: 0 10px; float:left;}
.welcomebk { font-size: 1.4em;}
You must log in to access this file.
To download this file you must right click and select Save As
Log in
Download: Thesis Top login (27)
I would welcome any review of this code for errors or potential security risks. Please let me know if you find this tip useful! Also add a link to your site below in the comments.
You can receive our articles for free on your email inbox, with more web design, template, CMS and blog tips.



You must log in to post a comment.