Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Tablet Responsiveness Issue for Query Loop

  • 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 🙂

  • 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?

  • Hi Ying:

    I’m using an Amazon Fire tablet, but it’s displaying as a mobile device.

  • Hi Rbt,

    I’m assuming your Amazon fire table has a screen width of 767pxor lower which is causing it to show in Mobile since Mobile is usually 767/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.

  • Hi Fernando:

    I just added this in code snippets and it still doesn’t seem to be working.

    Any ideas why?

  • 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.

  • 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?

  • 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.

  • Hi Fernando:

    Thanks for that, that’s great!

    Would I be using the “Test Management” option or “Test Observability?”

  • You’re welcome, Rbt!

    I use neither of those.

    I use Manual Testing – Live.

  • Oh I see. There’s no free version I suppose?

  • 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.

  • Ok no worries, thanks for all this, this is helpful.

    Either way, looks like the issue is resolved!

    Much appreciated!

  • You’re welcome, Rbt!

Viewing 16 posts - 1 through 16 (of 16 total)
  • You must be logged in to reply to this topic.