admin管理员组文章数量:1417070
I am dealing with a plugin, not with a theme, but what I want is to include this meta in the head section.
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
I browsed this link, but this link is also not helpful.
I believe it is doable through hooks and filter somehow.
w/o this meta tag the content is shrinking, including fonts getting minimized.
I am dealing with a plugin, not with a theme, but what I want is to include this meta in the head section.
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
I browsed this link, but this link is also not helpful.
I believe it is doable through hooks and filter somehow.
w/o this meta tag the content is shrinking, including fonts getting minimized.
Share Improve this question asked Aug 8, 2019 at 7:53 WordCentWordCent 1,8916 gold badges34 silver badges60 bronze badges 7- This has no business being part of a plugin. It affects the appearance of the site so is the theme's responsibility. If something like this isn't already in the theme, then it's likely not a responsive theme, and adding this won't fix that. – Jacob Peattie Commented Aug 8, 2019 at 8:05
- If it is not implemented by a theme. It becomes the business of a plugin creator to implement it. Have some empathy before nurturing a tendency to downvote all the time. I hardly remember any post in the past that you have not downvoted. despite the fact that this may be helpful for many in the future. – WordCent Commented Aug 8, 2019 at 8:06
- It is not the business of a plugin creator to implement anything like this. That's not how that works. This code does nothing useful unless the theme is built to support it, in which case it would already have it. – Jacob Peattie Commented Aug 8, 2019 at 8:09
- I know but you can check here even default 2019 is not supporting → not supporting That's why I said please have some empathy to OP. – WordCent Commented Aug 8, 2019 at 8:10
- 1 Twenty Nineteen already has that meta tag. It's a responsive theme. The reason stuff is appearing zoomed out is because of your CSS. If you look at the page you'll see that stuff is zoomed out because you have a popover element positioned absolutely over to the right. If you delete the popover element you'll see the issue is fixed. – Jacob Peattie Commented Aug 8, 2019 at 8:15
1 Answer
Reset to default 0Cant you just use the wp_head
action for this?
I mean something like this:
function add_meta_tags() {
?>
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
<?php }
add_action('wp_head', 'add_meta_tags');
Should work perfectly.
本文标签: phpParticular meta tagviewportinsertion when dealing with plugin
版权声明:本文标题:php - Particular meta tag - viewport - insertion when dealing with plugin 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745259931a2650309.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论