Site logo

Archived topic

Mobile view is not same as actual physical mobile screen

5 replies · Started by Prashant on January 6, 2020

Viewing posts 1–6 of 6

Hello
I am using GeneratePress & in customize, mobile view is looking different from actual mobile view in physical phone.

Here's how it looks like in customize (https://drive.google.com/file/d/1Tey5609e9j8OcaMreU_NMIQw0BHCW-Bl/view?usp=sharing)
Screenshot of the mobile view in wordpress

Here's how it looks in my phone (https://drive.google.com/file/d/1SOk7zefAFmEFZPFrzAmQxtNU-Xgw89Sm/view?usp=sharing)
view in my physical phone

Can anyone please help me?

I'm using GP Premium.
My phone Redmi 4
Browser Chrome

Thank you,
It worked.

Is there anyway to reduce width of the mobile preview in customize page?

So that, I don't kind of misguide myself by looking at another mobile preview than my actual physical phone?

Now it looks like this in preview (https://drive.google.com/file/d/1Tey5609e9j8OcaMreU_NMIQw0BHCW-Bl/view?usp=sharing)
preview

And like this in my physical phone (https://drive.google.com/file/d/1SlYExbfL1X6LqwhhdHk69dmk8r1PJ21O/view?usp=sharing)
actual

We can see they are different.

Absolutely, you can do that like this:

add_filter( 'generate_customizer_device_preview_sizes', function( $sizes ) {
    $sizes['mobile'] = 640;

    return $sizes;
} );

Let me know if you need more info :)

Hi Tom, thanks for replying.
Can you please tell me where should I write this code?

I am new in WordPress.

This archived topic is closed to new replies.