Change homepage only on mobile

Hi, I would like to have my page example.com/home as my homepage on desktop and the page example.com/projects as the homepage on mobile.
I would also like to have example.com/home redirecting me to example.com/project on mobile if I browse directly to example.com/home.
Is this possible?
I want to do this because example.com/home is like a showcase (kinda) of some projects with some interactions that look good on desktop, but on mobile this page doesn’t make much sense so I would like to skip it to make the website a bit simpler and direct.
Hope this all makes sense, thanks! :sweat_smile:

I actually don’t know if you can do that, but I know another solution for your problem.

Just copy everything from your mobile page to your desktop page. Then chose Display: None.
Go to the mobile view, make the mobile elements visible and the desktop elements invisible.

Bildschirmfoto 2020-05-03 um 19.13.44

That’s how I did it on my website. But I’m not sure if it’s the best solution for you…

Yes, I thought of doing that.
The problem is that on mobile I will have two identical pages and I would like to do something a bit cleaner.
Hope someone finds a better solution.

1 Like

Hey @simoneprandini, not sure if this is the best solution. If you don’t want mobile users to visit your homepage at all, you can use custom code to redirect if the screen size is less then, say 600px;

$('document').ready(function(){
  if($(window).width() < 600){
     location.href = '/project';
  }
}); 
1 Like

Hi, where do I put this?
Sorry, I’m not very good with custom code :no_mouth: :no_mouth:

Open the Page settings for Home and scroll to the bottom there will be a custom code box.

inside copy paste this code

<script>
$('document').ready(function(){
  if($(window).width() < 600){
     location.href = '/project';
  }
}); 
</script>
1 Like