Considering the structure of our mobile page, we need as Wordpress to have set on “Front page displays” from Settings-> Reading as “Your latest posts ”.
If your desktop theme uses another page other than that, you will need to include some codes into your both themes functions.php file
Like this we will automatically change that wordpress setting for both themes.
1. On the mobile theme functions.php file you will need to add
update_option( 'show_on_front', 'posts ' );
This will set on the mobile theme as home page “the latest posts”, meaning the theme will use index.php file as home page. The page we need to have on home page the slider images and navigation icons.
But that line of code will change also the home page of your desktop theme.
2. On your desktop theme functions.php file you will have to add
$about = get_page_by_title( 'about' );
update_option( 'page_on_front', $about->ID );
update_option( 'show_on_front', 'page' );
“about” must be your custom page name that you are using as home page on your desktop theme.