Closed. This question is off-topic. It is not currently accepting answers.admin管理员组文章数量:1415698
Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 5 years ago.
Improve this questionThrough the Yoast SEO plugin, I've added a 1200 by 630 image for use by sites like Facebook and LinkedIn (and the image shows up with a complete set of og meta tags).
I want to add a second open graph image (a square one) for use by WhatsApp (WhatsApp selects the last image and crops it to a 1 by 1.3 portrait aspect ratio and then displays it at 80 by 104 pixels, which doesn't work well with the image layout that works well with Facebook (and LinkedIn).
I don't think Yoast directly supports a second image, but is there a way using functions.php to add a second image (with the op:image, og:image:secure_url, og:image:height, og:image:width, and og:image:alt meta fields)? I wouldn't need the image data to be done programmatically, as I would use the same image for every page, so the information could be hard coded into functions.php.
Thanks for the help.
I've reposted the question at Stackoverflow for help with the PHP code.
本文标签: How can I add a second Open Graph image to a site using Yoast
版权声明:本文标题:How can I add a second Open Graph image to a site using Yoast? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745238449a2649177.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论