Issues with Removing the Community Slug
When we use the snippet to make the community appear on the root domain without the slug:
define('FLUENT_COMMUNITY_PORTAL_SLUG', '');
It causes some errors in the community.
So far, Iβve noticed two main issues:
- When I try to access a course from the left sidebar, it breaks.
- If Iβm inside a course and either refresh the page (F5) or hit the back button in the browser, it shows a 404 error.
When we donβt use the snippet:
define('FLUENT_COMMUNITY_PORTAL_SLUG', '');
Everything works perfectly, and there are no issues with the two cases I mentioned.
Same
Lucas FuadΒ Tindaro BattagliaΒ did you follow 3 steps described in this post here
Mat βΒ did everything, the problem still persists
We followed all the steps described in the post, but unfortunately, the issue persisted.
As a temporary solution, I created a snippet that redirects users to the /portal slug whenever they access the main domain.
Hereβs the code I used:
add_action('template_redirect', function() {
if (trailingslashit($_SERVER['REQUEST_URI']) === '/') {
wp_redirect(home_url('/portal'), 301);
exit;
}
});I get this same issue
Same issue indeed