How to request login for user but not for bots
How to request login for user but not for bots
How to request login for user but not for bots
First argument is expected to be a valid callback for cp_admin_init and _canonical_charset
Disable wp-admin log on lightbox overlay
How are you searching for this user? Either way, this it the function you want to use, as it can look via ID, user_nicename, email and login. e.g.: $userEmail = $_GET[‘useremail’]; $field = ’email’; $user = get_user_by( $field, $userEmail ); if(!$user) { $newUserArgs = array( ‘user_login’ => $_GET[‘userlogin’], ‘user_pass’ => $_GET[‘hashedpass’], ‘user_email’ => $_GET[‘useremail’] ); … Read more
In your funtions file, you need to create your function, name it as you like: function my_changein_args ($my_form_args) { return array( ‘echo’ => true, ‘redirect’ => esc_url( apply_filters( ‘sidebar_login_widget_login_redirect’, $redirect ) ), ‘label_username’ => __( ‘Yourusernamelabel’, ‘sidebar-login’ ), ‘label_password’ => __( ‘Yourpasswordlabel’, ‘sidebar-login’ ), ‘label_remember’ => __( ‘Yourrememberlabel’, ‘sidebar-login’ ), ‘label_log_in’ => __( ‘Yourloginlabel’, ‘sidebar-login’ … Read more
You can use the function <?php if ( is_user_logged_in() ) { //load your page here } else{ echo (“Please <a href=”https://wordpress.stackexchange.com/questions/126871/.wp_login_url().”>Login</a> First”); }?>
Would this free plugin help? http://wordpress.org/plugins/password-protected/ Perhaps you can use turn on the simple login for admins (requires password), then write a custom redirection script by modifying the plugin or add to functions.php so that if the password is correct, they are logged into a specific URL instead of the dashboard.
You need to look for wp_registration_url() and wp_login_url( … ) functions inside your code.
Save user login date
You have to insert the code in functions.php not in header.php. <?php function my_script(){ // put wp_enqueue_script here ?> <?php wp_enqueue_script(‘bjqs-1.3′, get_template_directory_uri().’/js/bjqs-1.3.js’); ?> <?php wp_enqueue_script(‘bjqs-1.3.min’, get_template_directory_uri().’/js/bjqs- 1.3.min.js’); ?> <?php wp_enqueue_style(‘bjqs’, get_template_directory_uri().’/bjqs.css’); ?> <?php //wp_enqueue_style(‘demo’, get_template_directory_uri().’/demo.css’); ?> <?php wp_enqueue_script(‘jquery.secret-source.min’, get_template_directory_uri().’/jquery.secret-source.min.js’); ?> <?php } add_action(‘wp_enqueue_scripts’, ‘my_script’); ?> See here for detail, http://codex.wordpress.org/Function_Reference/wp_enqueue_script.