Skip to main content

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:

  1. When I try to access a course from the left sidebar, it breaks.
  2. 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

Mat β€Ž

Lucas FuadΒ Tindaro BattagliaΒ did you follow 3 steps described in this post here

Mat β€ŽΒ did everything, the problem still persists

Lucas Fuad

Mat β€ŽΒ 

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;
    }
});

Liam McDonald

I get this same issue

Gee Adriaansz

Same issue indeed