Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change meta name ="Viewport" and its value #878

Closed
MohammedKaludi opened this issue Jun 2, 2017 · 8 comments
Closed

Change meta name ="Viewport" and its value #878

MohammedKaludi opened this issue Jun 2, 2017 · 8 comments
Assignees
Milestone

Comments

@MohammedKaludi
Copy link
Collaborator

MohammedKaludi commented Jun 2, 2017

ningnoom (@ ningnoom)

<meta name=”viewport” content=”width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no”>

I need “user-scalable=yes” but i don’t know to edit file location.

please tell me.

Ref link: https://wordpress.org/support/topic/how-to-chang-meta-nameviewport/

@MohammedKaludi MohammedKaludi added this to the 0.9.51 milestone Jun 2, 2017
@MohammedKaludi MohammedKaludi self-assigned this Jun 2, 2017
MohammedKaludi added a commit that referenced this issue Jun 2, 2017
Removed static meta Viewport and added via hook and filter also added
to modify the value
@MohammedKaludi
Copy link
Collaborator Author

MohammedKaludi commented Jun 3, 2017

Use this code to modify the Viewport meta

add_filter('ampforwp_modify_meta_viewport_filter', 'custom_prefix_modify_view_port_value');
function custom_prefix_modify_view_port_value() {
return '<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=2,user-scalable=yes">';
};

Thank you,
Mohammed Kaludi

@MohammedKaludi
Copy link
Collaborator Author

Tested and its Working.

@ElQadi
Copy link

ElQadi commented Jun 29, 2017

we modified viewport using your code
but still not scalable

https://el3rod.com/amp

@MohammedKaludi
Copy link
Collaborator Author

Hey @ElQadi
I the code is working on your site, the viewport value has been updated and I also see the reflection of that code in the mobile view, here is the screenshot http://take.ms/IGpN2

TIP: Please set initial-scale and minimum-scale to 1 your set to 2, it will make the screen size 200% on the load.

@ElQadi
Copy link

ElQadi commented Jul 1, 2017

Thanks Mohammed for your time, but we have been trying to "zoom in" with many mobile devices but can't.

@MohammedKaludi
Copy link
Collaborator Author

Hey @ElQadi,

Can you please tell me on which phone you tested? Because I'm able to Zoom in on my iPhone 5s with Safari.

Mohammed Kaludi

@ElQadi
Copy link

ElQadi commented Jul 1, 2017

Hi Mohammed,
We use android mobiles like SAMSUNG Note3 using firefox and chrome

@ElQadi
Copy link

ElQadi commented Jul 10, 2017

Hi Mohammed,
Do you support Android devices zoom?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants