In some cases, the search functionality in the RealHomes or RealPlaces theme may work fine for logged-in users but fail for non-registered users after enabling the “Remove unregistered URL parameters” setting in Yoast SEO. This setting removes unnecessary URL parameters, which can interfere with the search functionality that relies on
$_GET
parameters to perform searches.
For example, if a URL like this is used for search:
https://example.com/?status=apartment
After enabling this setting, the
status
parameter will be removed, causing the search functionality to break for users who are not logged in.
Solution:
To resolve this issue, you need to disable the “Remove unregistered URL parameters” setting in Yoast SEO, which is affecting the search functionality for non-registered users.
- Log in to your WordPress dashboard.
- Navigate to Yoast SEO → Settings.
- Click on the “Advanced” tab.
- Select “Crawl optimization” from the options under “Advanced“.
- Locate the setting “Remove unregistered URL parameters” and toggle it to “Off”.
- Save the changes and test the search functionality for both logged-in and non-logged-in users.
Once this setting is turned off, search should work as expected for all users, both registered and non-registered. If you still want to clean up URL parameters, you may consider excluding the search-related parameters from being removed. Consult the Yoast SEO documentation for advanced configuration options.
Conclusion:
Disabling the “Remove unregistered URL parameters” setting should restore search functionality for non-logged-in users. If you continue to experience issues or need further assistance, please feel free to get in touch with our support team.