Jump to content

How to hide a page on mobile site only

Recommended Posts

  • Replies 6
  • Views 1.4k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Yes i wanted to hide the About tab on the mobile navigation but keep it on desktop. I found a workaround and used the code below to send people to my mobile home page when they click About.

<script>
if (document.documentElement.clientWidth <860) {
 window.location = "/mobile";
}
</script>

The video I'm referring to is at the top of the About page on Desktop. If you watch it on a smaller screen like a  13"macbook then you see the "Watch Later", "Share", and video title at the top of the video during the first second.

Link to comment

I attached a picture. On smaller browsers you can see the title of the video "PENNIMAN CREEK...", the "Share" button and the "Watch Later" Button when the video starts. I tried copy and pasting the link from Youtube with the box checked Start at 0:01 to skip over this. But the link wouldn't work. 

Screenshot 2023-08-22 at 12.30.04 AM.png

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.