- This topic has 5 replies, 2 voices, and was last updated 4 years ago by
Maria Cecilia.
-
AuthorPosts
-
March 1, 2019 at 1:01 pm #825970
Maria Cecilia
When I select “Desktop Site” in Chrome on Android it works fine. However, on iOS it’s not working. In my child theme I can detect that it’s on mobile and on the front page using the following check (the is_mobile() function is defined in the plugin “mobble”):
if ((is_mobile() || is_ios()) && is_front_page())
The above result will change when I switch from “Mobile Site” to “Desktop Site” in Chrome.
How can I force GeneratePress to be “not responsive” on iOS? It doesn’t automatically do this (like it should) when I switch to “Desktop Site” in Chrome on iOS (but it does on Android).
The “Desktop Site” option changes the $_SERVER[‘HTTP_USER_AGENT’]).
GeneratePress 2.2.2GP Premium 1.7.8March 1, 2019 at 4:56 pm #826089Tom
Lead DeveloperLead DeveloperHi there,
I’m not 100% sure this plugin still works, but it’s worth a shot: https://wordpress.org/plugins/generate-disable-mobile/
People typically don’t want to disable the mobile mode, so we haven’t maintained it much.
That will disable the mobile mode for all devices.
Not sure it’s not working by default on iOS, I’ll need to debug that.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentMarch 2, 2019 at 5:13 am #826378Maria Cecilia
Hi Tom,
That plugin doesn’t seem to work anymore. In any case, I was just looking for a way that someone could switch to the desktop display. I solved it by asking them to use this browser:
https://itunes.apple.com/us/app/desktop-browser/id940076212?mt=8Thanks,
JonMarch 2, 2019 at 7:32 am #826585Maria Cecilia
Hi Tom,
On my home page, I have two columns. Column one contains posts from category one and column two has posts from category two. On the desktop, you can see all the recent posts at the top of the page. When I switch to a mobile device it moves column one underneath column two and in this case, you have to scroll down to see the recent posts from category one. A better responsive design would be to send the posts from the server client side as a table and then use javascript to decide how to display the posts. The table would have a column for each of the post fields. Then the javascript could decide on how to display the posts based on the type of device (e.g., desktop, tablet, or phone). On mobile, it could order the posts by date, while on the desktop it could use the two column format. Maybe, an enhanced version of your WP Show Posts plugin?
Thanks,
JonMarch 2, 2019 at 9:16 am #826651Tom
Lead DeveloperLead DeveloperHey Jon,
Sounds like an interesting idea – I’ll give it some thought!
Thanks! 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentMarch 2, 2019 at 10:55 am #826739Maria Cecilia
Hi Tom,
One way to do it would be to call wpsp_display twice (with different options) to get the single column and two column versions of the page. Then call json_encode on these two versions and pass it to the javascript. Then the javascript could decide which one to insert into the HTML. Not the most efficient way (since the server side needs to generate two versions of the page), but I think it could work.
Thanks,
Jon -
AuthorPosts
- You must be logged in to reply to this topic.