Title: Redirection URL doesn&#8217;t work
Last modified: February 22, 2025

---

# Redirection URL doesn’t work

 *  Resolved [afterthebreak](https://wordpress.org/support/users/afterthebreak/)
 * (@afterthebreak)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/redirection-url-doesnt-work/)
 * `Redirect URL when someone tries to access the wp-login.php page and the wp-admin
   directory while not logged in.`
 * I’ve set the redirect URL to _/blog_.
 * When visiting [Site URL] _/wp-login.php_ while logged out I get a Fatal Error
   message: There has been a critical error on this website.
 * When visiting [Site URL] _/wp-admin_ while logged out I get redirected to the
   blog.
 * When visiting _/wp-admin.php_ while logged out I get my sites 404 page (Elementor
   template).
 * That’s three different outcomes with two of them expected. Why the Fatal Error
   though??

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Support [MaximeWPS](https://wordpress.org/support/users/seinomedia/)
 * (@seinomedia)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/redirection-url-doesnt-work/#post-18242532)
 * Hello,
 * Thanks for using WPS Hide Login.
 * Did you check your error logs to know why there is a fatal error ?
 *  Thread Starter [afterthebreak](https://wordpress.org/support/users/afterthebreak/)
 * (@afterthebreak)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/redirection-url-doesnt-work/#post-18242619)
 * Hi thank you for getting back. I’ve now investigated further and here’s a summary
   of what I’ve discovered about WPS Hide Login’s behaviour and the issue:
 * As above, the core issue occurs when someone tries to access wp-login.php directly:
    - WPS Hide Login intercepts this request (as it should)
    - However, instead of just redirecting, it tries to load a full template page
      through its wp_template_loader() method
    - I believe this template loading is happening in plugin.php, specifically in
      the Plugin->wp_loaded() method
 * The problematic code flow:
    - WPS Hide Login catches wp-login.php access
    - Instead of a simple redirect, it calls wp_template_loader()
    - This forces WordPress to load a full theme template
    - This triggers BuddyBoss theme’s header and menu system
    - The menu system then fails because a required class (Menu_Icons_Settings) 
      isn’t available
 * Key point: I suppose you could say the error isn’t entirely about WPS Hide Login
   malfunctioning – in some sense it’s working as coded. However, its approach of
   loading a full template for wp-login.php access is causing unexpected interactions
   with BuddyBoss, more directly the theme’s menu system. (And I note that similar
   issues have been mentioned in the support forum?)
 * Suggestion? Perhaps rather than loading a full template for wp-login.php access,
   WPS Hide Login could simply perform a redirect or return a customisable basic
   403/404 response? This would avoid the template loading that’s triggering the
   BuddyBoss theme’s menu system and causing the error.
   `PHP Fatal error: Uncaught
   Error: Class "Menu_Icons_Settings" not found in /mnt/data/wp-content/themes/buddyboss-
   theme/inc/plugins/buddyboss-menu-icons/includes/front.php:60`
 * Stack trace: 
   #24 /wp-content/plugins/wps-hide-login/classes/plugin.php(600):
   WPS\WPS_Hide_Login\Plugin->wp_loaded() #23 /wp-content/plugins/wps-hide-login/
   classes/plugin.php(134): WPS\WPS_Hide_Login\Plugin->wp_template_loader() #22 /
   wp-includes/template-loader.php(106): include(‘…’) #21 /wp-content/themes/buddyboss-
   theme-child/404.php(13): get_header()
 *  Thread Starter [afterthebreak](https://wordpress.org/support/users/afterthebreak/)
 * (@afterthebreak)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/redirection-url-doesnt-work/#post-18242667)
 * BTW, even with our child theme’s 404.php disabled, WordPress falls back to BuddyBoss
   parent theme’s 404.php file (notice line #21 in stack trace changed from buddyboss-
   theme-child to buddyboss-theme):Copy
 * `#21 /wp-content/themes/buddyboss-theme/404.php(9): get_header()`
 * This confirms I believe the earlier analysis that the issue isn’t with the 404
   template itself, but rather with WPS Hide Login’s approach of loading the full
   template system. Looking at the new stack trace, the sequence remains the same:
    1. WPS Hide Login catches the request
    2. Forces template loading
    3. Which loads the 404 template
    4. Which loads the header
    5. Which triggers BuddyBoss’s menu system and fails
 * This test reinforces that the issue is WPS Hide Login’s template loading behaviour…
   
   I look forward to your comment/suggestion.Thank you
 *  Plugin Support [MaximeWPS](https://wordpress.org/support/users/seinomedia/)
 * (@seinomedia)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/redirection-url-doesnt-work/#post-18243450)
 * Re [@afterthebreak](https://wordpress.org/support/users/afterthebreak/),
 * The log message indicates the error is due to BuddyBoss theme. Then, you should
   contact them to fix it.
 *  Thread Starter [afterthebreak](https://wordpress.org/support/users/afterthebreak/)
 * (@afterthebreak)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/redirection-url-doesnt-work/#post-18243506)
 * I carefully explained to you why it has to do with your plugin but you don’t 
   seem to care or respect my time, you just take the easy option of saying it’s
   an SEP. Shame.
 *  Plugin Support [MaximeWPS](https://wordpress.org/support/users/seinomedia/)
 * (@seinomedia)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/redirection-url-doesnt-work/#post-18243602)
 * I don’t have these issues on my tests and when I ask for any errors in your logs,
   you share an issue from BuddyBoss :`PHP Fatal error: Uncaught Error: Class "Menu_Icons_Settings"
   not found in /mnt/data/wp-content/themes/buddyboss-theme/inc/plugins/buddyboss-
   menu-icons/includes/front.php:60
 * Maybe the third issue you noticed is due to WPS Hide Login but it can also be
   fixed bye BuddyBoss corrections.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Redirection URL doesn’t work’ is closed to new replies.

 * ![](https://ps.w.org/wps-hide-login/assets/icon-256x256.png?rev=1820667)
 * [WPS Hide Login](https://wordpress.org/plugins/wps-hide-login/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wps-hide-login/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wps-hide-login/)
 * [Active Topics](https://wordpress.org/support/plugin/wps-hide-login/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wps-hide-login/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wps-hide-login/reviews/)

 * 6 replies
 * 4 participants
 * Last reply from: [MaximeWPS](https://wordpress.org/support/users/seinomedia/)
 * Last activity: [1 year, 4 months ago](https://wordpress.org/support/topic/redirection-url-doesnt-work/#post-18243602)
 * Status: resolved