Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

login

wp_logout logging everyone out instead of just the user that clicked the logout link!

Seems as though the session needed to be destroyed with the following: <a href=”https://wordpress.stackexchange.com/questions/66309/<?php $redirect = bloginfo(“url’); wp_logout( $redirect, $echo ); ?>”> Logout </a>

Categories login Tags front-end, login, logout

Front-end login problem: requires re-authorization when accessing dashboard

OK, I’ve got it! According to wp codex, second parameter of wp_signon() function refers to whether to use auth cookie or not. So if you use wp_signon( $user_arr, false ); …re-auth will not be required.

Categories login Tags front-end, login

Registration and Login form

Go with Theme My Login. Well written and very functional

Categories login Tags login, user-registration

Showing A Menu When Only Users Are Logged In [duplicate]

Use the is_user_logged_in() conditional to output a different menu depending on user login state. For example: $theme_location = ( is_user_logged_in() ? ‘header_logged_in’ : ‘header_not_logged_in’ ); wp_nav_menu( array( ‘theme_location’ => $theme_location );

Categories login Tags login, wp-login-form

How to force login after user browses for a few minutes or browses a few pages?

You could hook into template_redirect and check a cookie. Just an idea, not tested: add_action( ‘template_redirect’, ‘t5_force_login_after_time_span’ ); function t5_force_login_after_time_span() { $cookie_name=”first_visit”; $now = time(); if ( is_user_logged_in() ) return; if ( empty ( $_COOKIE[‘first_visit’] ) ) { setcookie( $cookie_name, $now, $now + WEEK_IN_SECONDS ); return; } $first_visit = (int) $_COOKIE[‘first_visit’]; if ( ( $now … Read more

Categories login Tags login, user-registration

I get 404 when I try to login ever since I changed the permalink

You can still get to your login page: http://wayfaroutadventures.com/blog/wp-login.php You probably haven’t done any serious damage. Login to your site over FTP or using some file manager provided by your host and add: define(‘WP_SITEURL’, ‘http://example.com/wordpress’); define(‘WP_SITEURL’, ‘http://’ . $_SERVER[‘HTTP_HOST’] . ‘/path/to/wordpress’); See: http://codex.wordpress.org/Editing_wp-config.php#WordPress_address_.28URL.29 Of course, the addresses need to match exactly what you had before … Read more

Categories login Tags 404-error, login

Give user some feedback when they land on custom login page

You have a number of options at your disposal. Two of which could be; 1) Stop the user from being re-directed to /login and use jQuery to alert the user that their login information is incorrect on the page in which the details were entered. 2) You could have them re-directed to the /login page … Read more

Categories login Tags login

Adding A Login Fail Notice

Adding A Login Fail Notice

Categories login Tags login

User not logged first time I open the homepage

Just for everybody to know I finally got through this. WordPress was installed in a subfolder and the rewrite rule was partialy wrong, so that the session wasn’t properly recognized from the homepage. I rewrote the rule as it was suppsed to be and now everything works.

Categories login Tags homepage, login, session

Enqueue script on logon failure

I worked out a way to conditionally print a script to the head of the page, but not to actually enqueue it. The code depends on the presence of the wp_shake_js callback that is conditionally added to the login page on login failure. If that hook is present, the assumption is that the login failed. … Read more

Categories login Tags login
Older posts
Newer posts
← Previous Page1 … Page8 Page9 Page10 … Page75 Next →
+ More

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Post Navigation Elementor
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • WPFacet multiple loop displaying duplicate content
  • Get the name of the template/*html file used
  • Fix: WordPress.DB.PreparedSQL.NotPrepared Plugin Check (PCP)
  • Removing unnecessary CSS and JS code from wp_head()
  • hexagonal image gallery. Am I on the right track? [closed]
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
© 2026 Read For Learn
Next Page »
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress