How to create a custom shortcode for custom login form?
To get the URL for lost password use wp_lostpassword_url() Reference: wp_lostpassword_url()
To get the URL for lost password use wp_lostpassword_url() Reference: wp_lostpassword_url()
You need to redirect everytime WordPress looks for wp-login.php. You can do the same by using the below in your active theme’s functions.php file. function redirect_login_page(){ // Store for checking if this page equals wp-login.php $page_viewed = basename( $_SERVER[‘REQUEST_URI’] ); // permalink to the custom login page $login_page = get_permalink( ‘CUSTOM_LOGIN_PAGE_ID’ ); if( $page_viewed == … Read more
Try the Jetpack Comments system, included in the Jetpack plugin. http://jetpack.me/support/comments/
after_setup_theme should not execute after the shortcodes process. Shortcodes process when the post body renders. after_setup_theme runs well before that. Your analysis of the problem is incorrect. This looks like a variable scope problem to me. None of the variables inside your custom_login function are going to be accessible outside that function. Their “scope” is … Read more
You might be looking for a logged in conditional. From the WP Codex, you might be able to try in your theme (untested): <?php if ( is_user_logged_in() ) { get_currentuserinfo(); echo ‘Logged in as ‘ . $current_user->user_firstname; } ?> EDIT After consulting the WP Codex on the topic, I was able to display my user’s … Read more
Just wanted to add my own experience to this thread. I’ve tried many different configurations of WordPress cookie constants in wp-config without any luck. I’m setup in the same way as described by the OP using custom_user_table and meta_table. I’ve found the session information does actually translate across different pages if you use COOKIE_DOMAIN as … Read more
Try the following code in your functions.php: function my_login_redirect( $redirect_to, $url, $user ) { global $user; if( isset( $user->roles ) && is_array( $user->roles ) ) { //check for admins if( in_array( “administrator”, $user->roles ) ) { // redirect them to the default place $redirect_to = admin_url(); } else { $redirect_to = site_url( “https://wordpress.stackexchange.com/” . $user->user_login … Read more
It is possible that the home url for your site is being overridden in your wp-config.php file, I would make sure the missing colon isn’t originating from there.
The way you suggest doing this, it won’t ever be secure. If I understand you, just disabling Javascript would spoil the security. What you’d need to do is run a script that uses an AJAX request to query for and then add data to the page, but only if the user is logged in. That … Read more
There’s a “Membership” setting under Settings > General. By disabling “Anyone can register” the public-facing registration page will be effectively removed, along with the ‘register’ button. The API, however, will still be usable (e.g. wp_create_user().) On a side note, you mention NOTE: I’m working in a plugin already, so I cannot just use another plugin … Read more