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

2 wordpress blogs with 1 users table and 1 login

Install wordpress at sitename.com Setup multisite Create a new site at /wordpress1/ Create a new site at /wordpress2/ Install Buddypress plugin Activate buddypress on /wordpress2/ ( not network wide, just wordpress2 ) Hey presto you have exactly what you want without the nightmarish usertable situation Problems you will face with the login using a shared … Read more

Categories login Tags cookies, directory, login, shared-user-tables

woocommerce and is_user_logged_in() if not redirect to homepage

You are going to want to insert your code at the top of the page templates for the Woo pages you would like the redirect to affect rather than the functions file. So for example if you want to redirect users when they try to access an individual product page you could put it at … Read more

Categories PHP Tags login, membership, php, plugins

How to set different cookies for logged in admin users and logged in non admin users?

You can use current_user_can() to detect what type of user is logged in, if any, then use setcookie() and $_COOKIE to test and set the necessary cookies. function wpse_74742_stop_cache_cookie() { if (current_user_can(‘admin’)) { if (empty($_COOKIE[‘disable_cache’])) { setcookie(‘disable_cache’, 1); } } } add_action(‘init’, ‘wpse_74742_stop_cache_cookie’); This is an extremely basic example. There are a lot of details … Read more

Categories login Tags cookies, login

WordPress Multisite local: wp-login.php refreshes on login Chrome Browser

I solved my own problem. I installed WordPress MU Domain Mapping plugin, set the mapping my to home ip, 127.0.0.1, then added my site to domains with the domain name I wanted. The domain name in domains must match the site domain. Once all of that was done, I made sure the domain was also … Read more

Categories multisite Tags google-chrome, localhost, login, multisite

Subdomain login problems

Google led me to this page: http://lauragentry.com/blog/2012/01/05/when-wordpress-network-subdomain-blogs-wont-let-you-log-in/ There’s a chunk of code in there that I added to my wp-config.php file, to wit: define(‘ADMIN_COOKIE_PATH’, “https://wordpress.stackexchange.com/”); define(‘COOKIE_DOMAIN’, ”); define(‘COOKIEPATH’, ”); define(‘SITECOOKIEPATH’, ”); What I don’t quite understand is why this works. Anyone know? Updated It doesn’t completely work — I can now log in to the … Read more

Categories multisite Tags cookies, login, multisite, subdomains

Remove default user registration, login and subscriber profiles

I realised this is probably better dealt by the server, I ended up putting the following in a .htaccess: # Block regular login/registration and profile pages <Files wp-login.php> Order Deny,Allow Deny from All </Files> <Files profile.php> Order Deny,Allow Deny from All </Files> This prevents any requests to those pages and forces users to use my … Read more

Categories functions Tags functions, login, spam, user-registration

Can’t access login page after password reset

This could be down to a number of reasons: a) The browser you’re having problems with is saving the old password and refusing access. This is why the other browser works when logging in with the new password. Try and reset the saved password to see if this solves the issue. b) Your hosting provider … Read more

Categories login Tags login

Custom Connect to Facebook, problem logging in/logging out

The tutorial from the link I provided was destroying the facebook session after login in and creating a new account for some reason. I just had to remove $facebook->destroySession(); from both parts and now everything is working as intended. Here is the code from the tutorial with both lines commented out. if ($fbuser) { $fb_registerpage_name … Read more

Categories login Tags api, facebook, login, logout, session

Use phpbb user database for WordPress

How about trying the WP-United plugin? It seems to do what you want: User integration: including single sign-on, synchronised profiles and avatars, and user management. Works with external registration modules such as social login plugins. Users in phpBB get accounts in WordPress and vice versa. Completely controllable and customisable by setting permissions for who can … Read more

Categories users Tags forum, login, users

How can I allow access to two user accounts using one login?

I would reverse engineer the User Switching plugin and then create a solution that works for you. Fortunately there is not a whole lot of work to do. Most of the crucial functionality is in this function: function switch_to_user( $user_id, $remember = false, $set_old_user = true ) { if ( ! $user = get_userdata( $user_id … Read more

Categories login Tags login, switch, user-access, woocommerce-offtopic
Older posts
Newer posts
← Previous Page1 … Page131 Page132 Page133 … Page164 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