-
Rbt127
Hi There:
I’ve just finished editing a query loop that I’ve adjusted the grid settings for on tablet. However, when checking it on an actual tablet device, it’s not showing up as the 50% grid width as opposed the 100% I’m using for mobile and 33% for desktop.
Mobile and desktop are working just fine, but the tablet version is displaying the 100% for mobile.
Can you help?
Thanks so much!
Regards,
Ron
-
Hi Ron,
Can you link us to your site and make sure cache is all cleared?
Let me know 🙂
-
Rbt127
Sure, sent and the cache is cleared!
-
It doesn’t seem to have any issue when I check.
What is the device are you using?
-
Rbt127
Hi Ying:
I’m using an Amazon Fire tablet, but it’s displaying as a mobile device.
-
Fernando
Hi Rbt,
I’m assuming your Amazon fire table has a screen width of
767px
or lower which is causing it to show in Mobile since Mobile is usually767/768px
or lower.On an actual iPad 9th gen, it’s showing up
50%
Grid width upon testing.If you want to alter the Tablet Breakpoints, try adding this snippet:
add_action( 'wp', function() { add_filter( 'generateblocks_media_query', function( $query ) { $query['tablet_only'] = '(max-width: 1024px) and (min-width: 765px)'; $query['mobile'] = '(max-width: 764px)'; return $query; } ); }, 20 );
Adding PHP: https://docs.generatepress.com/article/adding-php/#code-snippets
Make sure to Regenerate your CSS files in Settings > GenerateBlocks.
-
Rbt127
Hi Fernando:
I just added this in code snippets and it still doesn’t seem to be working.
Any ideas why?
-
Fernando
That code should work. It must be caching or your Amazon fire tablet has a lower media breakpoint.
Try decreasing 765px and 764px in the code to lower corresponding values to test. If this doesn’t work, try to choose Inline Embedding for the CSS Print Method in Settings > GenerateBlocks.
If it doesn’t work, your tablet is likely cached.
-
Rbt127
Hi Fernando:
So I realized that the Fire tablet has two versions to switch between, mobile and “desktop.” When I set it to desktop, it looks like it’s supposed to on tablet. Even after removing the code snippet.
Unfortunately, I don’t have an actual tablet device to check it. However, seeing as how it looks fine in the editor and since you said it displays properly in the iPad 9th gen, I’m assuming it’s good to go.
Would that be an accurate assumption?
Also, is there any way to check the tablet display online somewhere since I don’t have a proper device to check?
-
Fernando
I see. Yes, that should be accurate.
I personally use BrowserStack to check for site responsiveness. Reference: https://www.browserstack.com/
They have different “Real” devices there for tests.
-
Rbt127
Hi Fernando:
Thanks for that, that’s great!
Would I be using the “Test Management” option or “Test Observability?”
-
Fernando
You’re welcome, Rbt!
I use neither of those.
I use Manual Testing – Live.
-
Rbt127
Oh I see. There’s no free version I suppose?
-
Fernando
There’s only a free trial, unfortunately.
I found some other testing tools through Google. Ex: http://responsivetesttool.com/ – not sure if this would be accurate though.
I’ve only been exclusively using BrowserStack since the test is on an actual device, not a simulation.
-
Rbt127
Ok no worries, thanks for all this, this is helpful.
Either way, looks like the issue is resolved!
Much appreciated!
-
Fernando
You’re welcome, Rbt!
- You must be logged in to reply to this topic.