How can do I set fluent community to base domain
I want my website to load fluent community by default on my domain www.example.com
Instead of having to put it on www.example.com/url
Please how do i do this without using a redirecting plugin or snippet. When using a redirecting snippet or plugin, my woocomerce payments stop working. Is there any way to achieve this behaviour natively?
Paste this code in WP-Config.php
define('FLUENT_COMMUNITY_PORTAL_SLUG', '');
Moha AlabriΒ Thank you my brother
Mahmoud ObeidiΒ youβre most welcome
ollaΒ Hi, I am having trouble getting this to work for me and not sure what i am missing. Do i supposed to put something in the "? it is still going to my blog page and not the portal login page.
Tambria KempΒ Hello, I personally added this code in the wp-config.php file as follows and it works fine
Never mind just got it to work, here is the snippet i used:
function redirect_base_domain_to_portal() { // Check if it's the front page and not in the admin dashboard if ( is_front_page() && !is_admin() ) { // Get the current URL without query parameters $current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; // Check if the current URL is exactly the home URL if ( trailingslashit( home_url() ) === trailingslashit( $current_url ) ) { // Perform a 301 permanent redirect to /portal wp_redirect( home_url( '/portal' ), 301 ); exit(); } } } add_action( 'template_redirect', 'redirect_base_domain_to_portal' );