Community without /slug - how to change it
Did anybody test the community without the /slug already?
It can be a nice solution when using fCommunity only on a separate subdomain/WP instance so it looks the same way as this fCommunity.
If you want to make the portal as your homepage, you can use the following code.
Please note that, this will not work if your WordPress installation is in a subdirectory. The WordPress installation should be in the root directory of our domain or sub domain.
Code snippet:
define('FLUENT_COMMUNITY_PORTAL_SLUG', '');
Ref: link
Step by step instruction:
-
Add the below define entry to the wp-config file > Save
define('FLUENT_COMMUNITY_PORTAL_SLUG', ''); -
Go to wp-admin > Permalinks > select Post-Name (https://domain.com/sample-post/) > Save Changes
-
In the other already opened browser tab (to avoid access issue you need to be logged in to your fCommunity before you start making changes) with Admin user
Settings > General > Login/Signup Form Type >
-
Use Custom Login Page > enter: https://domain.com/?fcom_action=auth
-
Default Login URL > should display the above name
Save Settings
-
-
*If you want to restore your previous slug (so the current slug is empty but you want to have any new Slug name) you need to add this step:
- Go to the wp-admin > FluentCommunity item (/wp-admin/admin.php?page=fluent-community)
- click Change Community URL > enter your Slug: /portal (or any other Slug name example: /members)
Note: There is no need to use any other redirection to have your fCommunity with apex/naked domain: domain.com
I did. Works well mostly, but there are a couple of places where you try refreshing the page and it says nothing is found because the URL is not working. Course page, for example (/course/[coursename]/lessons).
Mat ΒΒ Works well for me using cloudflare to add A record and page rules to forward https://app.mydomain.com (example) to https://mydomain.com/portal
Madis MarkΒ Debo OgunrindeΒ I have just added steps to the above post and there is no need for adding any additional redirection once you follow these steps - it works fine with me.
But I still have this problem: https://www.loom.com/share/e7bd44b1f2fe4ce6a3e156f14209334b?sid=f5695059-ff00-4626-aaa8-152aee27d5da
Not all URLs are working when you remove the slug.
Madis MarkΒ I belive this issue happens to all non standard /portal slug so this is something the Team needs to investigate. I have just switched back to /portal slug to avoid more advanced scenarios.
This isn't working for me. Did a recent update change the behavior?
Alternatively, where precisely in the wp-config file should that 'define' line be placed? I tried a few.
Mat βΒ You say "like this community" but this community is running on /portal
Have you stopped using this technique for this FC? If so, why?
I'm having no end of problems with this setup and will probably give it up and use a regular homepage and a /portal for the actual community...
Lee BuschΒ the original post is 2months+ old (it was submitted during Beta testing phase) and there were many fixes applied and probably new bugs discovered since then.
Currently if you want to change the slug to any other custom value (text) you don't need to place any custom code in wp-config.php and it should work.
If there are any issues with that slug change then just list them on this community as a post or open a support ticket and they should be resolved by Ninjas one day.
If existing issues won't be listed probably they wont be fixed.
For the case where you completely want to remove the /portal slug (AFAIR) the custom code need to be placed in wp-config.php file (I am not sure why you cannot edit that file from the hosting end as a Admin - probably you lock that file down with some security settings).
Note: You can edit the wp-config.php file via FTP, cPanel/DirectAdmin or SSH and you should be able to perform manual edits in this way.
I added define('FLUENT_COMMUNITY_PORTAL_SLUG', ''); to wp-config, but I want to have users who are not logged in to be directed to the login or new account form (?fcom_action=auth).
I found the fCommunity Settings -> General for Login/Signup form type and modified it with the auth query. But when I go to community.domain.com and am not logged in, I see the community dash board and a pop-up error "Sorry, you are not allowed to do that."
Suggestions?
Elaine MontoyaΒ If a user is not being logged-in then the fluent community login form will be displayed to the user - domain.com/?fcom_action=auth
When it comes to the error:
I see the community dash board and a pop-up error "Sorry, you are not allowed to do that."
I am not sure what url you as an user are accessing. In other words...
When you type the url: domain.com and you are not being logged-in are you being redirected to the correct url: domain.com/?fcom_action=auth and you see the community login form? If Yes.. then are you able to provide your user credentials and the user is being logged in? If Yes.. then what is the url where the user see the error message?
Note: do you use any cache plugin or CDN?
When you type the below url on in a browser Private Mode do you also get the error: "Sorry, you are not allowed to do that."
domain.com/?fcom_action=auth
Mat βΒ to clarify... my subdomain is the root of the community - no slug. That works fine. The issue is when a user is NOT logged in, it is not redirecting to subdomain/domain.com/?fcom_action=auth
Elaine MontoyaΒ and what is the url for the community Default Login URL field in your settings (domain.com/admin/settings)?
Is it set to: domain.com/?fcom_action=auth
Note: I assume you don't use any other custom redirections with your wordpress (either in .htaccess or in code snippets).
Mat βΒ Thanks for the reply. I disabled all other code snippets. But I looked at the console errors in the browser (fluentcommunity-something....not loading). Deactivated the plugin, and reactivated it...and now all is good! Thanks for your help! I appreciate you.
Hi Andrij Tkachenko, it seems like better messages leads to 404 page once the community slug is defaulted to the home page. Could you please take a look??
Thank youΒ
SophiaΒ thanks for letting me know! will be fixed in next update
Andrij TkachenkoΒ thank you so much
Seems like it redirects every page back to the home, even other non FC pages. Anyone with an idea of how to go about that?
Sophia SΒ Is this fixed? I really want to have my community on the root domain but because these kind of issues, I changed it back
Gee AdriaanszΒ fixed a long time ago my friend
Does this still work in the latest version? I followed all steps and cleared cache but the community still loads from /feed.