Homepage not working after setting as frontpage

Try going to the Settings Panel, and then changing the Permalink structure to any other. After this, try changing back to the original setting. This can be some problem with the rewrite rules made by the theme when the base structure is changed.

Swap home page based on user role, Elementor layout breaking

I do believe I’ve got it. Here’s the code: // Display different home page for dealer vs consumer if( is_user_logged_in() ) { $current_user = wp_get_current_user(); $user = new WP_User($current_user -> ID); if (in_array(‘Wholesale’, $user->roles)){ $page = get_post(2885); update_option( ‘page_on_front’, $page->ID ); update_option( ‘show_on_front’, ‘page’ ); } else { $page = get_post(2847); update_option( ‘page_on_front’, $page->ID ); … Read more

Different front page for logged in and logged out user but the same URL in WordPress

If you’re just trying to display different content to logged-in vs. logged-out users, I’d recommend using the the_content filter. add_filter( ‘the_content’, ‘wpse_387084_content_selector’ ); function wpse_387084_content_selector( $content ) { if ( is_front_page() && is_user_logged_in() ) { $page = get_post( 2516 ); $content = $page->post_content; } return $content; } The above code assumes that you’ve set the … Read more