show page only on mobile

  • Unknown's avatar

    Hi in my home page… there is a child page called “this page” you can see here: kahol.co.il

    what Im trying to do is that this childpage will appear only on mobile…
    how can I do this?

    thanks!

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Hi there, the only problem we have is deciding on what width to use in the media query. “Mobile” is a very broad thing now with nearly 100 different widths/heights. iPads have a resolution of 768px x 1024px, do you want to hide for tablets also? The new iPad Pro has a browser resolution of 1024px x 1366px. If you wish to show that page on iPad Pros in landscape orientation, then we are going to end up hiding it for a lot of laptops as well. Also, you have no control over the width a user sets their browser window at. They may have a 1440px wide monitor, but have their browser window set to 1000px in width.

    There is no way to reliably detect whether someone is using a touch device or not. In the following Media Query, I’ve arbitrarily set the query at 768px width, which will allow the page to be seen on the majority of phone devices.

    @media screen and (min-width: 768px) {
    	.home #post-2531 {
    		display: none;
    	}
    }
  • Unknown's avatar

    Thanks thesacredpath I understand the problem now :)

    I’m trying now different aproach and I published a post about it here
    https://en.forums.wordpress.com/topic/align-picture-to-ledt-in-home-page?replies=2

    Hope you can help :) thanks!

  • Unknown's avatar

    I’ve answered that in a different thread.

  • The topic ‘show page only on mobile’ is closed to new replies.