最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

plugin development - WordPress Iframe for blog image

programmeradmin1浏览0评论

I would like to have an Instagram feed for featured image of the blog.

Already I have Instagram feed blog post but I would like it to be also on featured image.

Any idea how to achieve this?

Link to blog - /

Link to the blog post where you can see Instagram feed which I would like to use as featured image. - /

I would like to have an Instagram feed for featured image of the blog.

Already I have Instagram feed blog post but I would like it to be also on featured image.

Any idea how to achieve this?

Link to blog - https://messnermoto/blog/

Link to the blog post where you can see Instagram feed which I would like to use as featured image. - https://messnermoto/messnermoto-motorcycle-rearview-mirror-evolution/

Share Improve this question asked Apr 3, 2019 at 14:35 MirjanMirjan 1 11
  • So you want to use an actual feed instead of the featured image, or you want to be able to use a single instagram photo instead of the featured image? The feed will require you to use the Instagram API / Graph API and the latter would mean adding a custom field to your post to allow you to enter a URL to a specific instagram post / image. – Alexander Holsgrove Commented Apr 3, 2019 at 15:24
  • Hi, I have already a plugin for feed. My question is how to replace that image that you see on my 1 post with that feed. Thank you! – Mirjan Commented Apr 3, 2019 at 15:38
  • You would need to edit your template (or make a child theme) and replace the code in image_frame post-photo-wrapper with your Instagram feed. – Alexander Holsgrove Commented Apr 3, 2019 at 15:44
  • I have a child theme. Do I need to do for every post or is there a way to fetch it form post? Thank you! – Mirjan Commented Apr 3, 2019 at 15:50
  • It depends if you want the same feed for each post, or if you want to load a specific image per post. If you want to load a feed each time, just edit the template file which displays the image_frame post-photo-wrapper div class. If you want a custom image, defined on each post (are you using ACF?) then you will need to alter the same div and retrieve the instagram image URL from the post. – Alexander Holsgrove Commented Apr 3, 2019 at 16:01
 |  Show 6 more comments

1 Answer 1

Reset to default 0

It depends a bit on your theme how to tackle this, because under most circumstances you cannot just change the featured image without writing a plugin.

If you're experienced with writing WordPress plugins (and Instagram' API) you could write your own plugin that replaces the featured image.

I would rather recommend using an existing plugin - the first I googled was Instagram Feed by Smash Balloon, which looks like it can do what you need. Using that plugin I would not show the featured image but instead use the Plugin's shortcode in order to show the right Instagram feed for your product.

发布评论

评论列表(0)

  1. 暂无评论