Dynamic homepage according to user role
To use a different page’s content on the homepage based on a logged-in user’s role you can do this: In your functions.php file add this code: function wpse_273872_pre_get_posts( $query ) { if ( $query->is_main_query() && is_user_logged_in() ) { //work-around for using is_front_page() in pre_get_posts //known bug in WP tracked by https://core.trac.wordpress.org/ticket/21790 $front_page_id = get_option(‘page_on_front’); $current_page_id … Read more