Add logout link when logged in, make it disappear when logged out?
Try using wp_loginout(). It automatically handles those conditions.
Try using wp_loginout(). It automatically handles those conditions.
Did you check out the codex? http://codex.wordpress.org/Customizing_the_Login_Form What you are refering to is because of the default title attribute on the logo image. You can change that by adding some code to the functions.php file for your theme. Here’s how (from the codex): To change the link values so the logo links to your WordPress … Read more
Elaborate plugins exist to restrict page access based on a user role or other settings. However, I guess the following code is as simple as it’s gets for checking a user role. <?php global $current_user; if ( is_page( ‘some-page’ ) && in_array( ‘some-role’, $current_user->roles ) ) { // Show the page } else { // … Read more
You can trigger wp_mail() to send you an email when you have a visitor, although you may end up getting flooded with emails since it’ll email you every time a page is viewed. /** * Send an email with every visit. */ function wpse113069_email_me_every_visit() { wp_mail( ‘[email protected]’, ‘You had a visitor…’, ‘Yea, someone was on … Read more
By far the easiest fix is to edit wp-config.php to define two constants. (s)FTP into your site, or use a host supplied file manager, and add: define( ‘WP_SITEURL’, ‘http://www.abc.com/folder’ ); define( ‘WP_HOME’, ‘http://www.abc.com/folder’ ); Those will be used instead of the information in the database. That will get your site up and running again. You … Read more
I figured it out! http://codex.wordpress.org/Changing_The_Site_URL All I did was add this to my wp-config file after the define(‘WP_DEBUG’, true); command define(‘WP_HOME’,’http://mydomain.com’); define(‘WP_SITEURL’,’http://mydomain.com’);
It doesn’t matter what function you use to generate the form markup, if you write the code by hand, or if it’s in a modal or not. For it to be secure, you absolutely need an SSL certificate.
There are few scenarios you have to consider. 1. Obtaining your password from database This is almost impossible to do. WordPress stores all passwords as hashes. When you log in, the password you’ve entered in form is hashed and compared with the hash stored in DB. This way you can check if the password is … Read more
If you have your site footer and masthead (e.g. including main menu, hero image, etc.) HTMLs as separate template files, you could bascially include them on the default login page like this, add_action(‘login_head’,function(){ get_template_part( ‘site-header’ ); }); add_action(‘login_footer’,function(){ get_template_part( ‘footer’ ); }); I wouldn’t use get_header and get_footer directly as they probably contain some extra … Read more
Your last lines are missing semi-colons: echo ‘<div class=”omid-header-proimg”><img src=”‘. bloginfo(‘template_url’) .’/images/omid-nonsignin.png”></div>’; echo ‘<div class=”omid-logpanel”><a href=”https://test.com/panel”>login</a></div>’;