admin管理员组文章数量:1130349
We are using the Exopite Simple Options Framework framework in our plugin. One of the fields is an image upload metabox:
This works fine and images are uploaded and attached to the post as expected.
When we try this on a subsite on a multi-site network we run into a problem. It is fine on the parent network site
It appears to not show up. After inspecting we see it is giving /sites/4/sites/4/ instead of just /sites/4/.
If we manually change the URL to /sites/4/ it works.
A few points:
- We have disabled all other plugins
- We are using a default theme
wp_get_attachment_image_src()gets the wrong path to image butget_attached_media()gets the correct paths- It is stored in the database correctly, but in the media page it is the wrong path
Maybe it is an htaccess thing?
If you require any further info let me know.
We are using the Exopite Simple Options Framework framework in our plugin. One of the fields is an image upload metabox:
This works fine and images are uploaded and attached to the post as expected.
When we try this on a subsite on a multi-site network we run into a problem. It is fine on the parent network site
It appears to not show up. After inspecting we see it is giving /sites/4/sites/4/ instead of just /sites/4/.
If we manually change the URL to /sites/4/ it works.
A few points:
- We have disabled all other plugins
- We are using a default theme
wp_get_attachment_image_src()gets the wrong path to image butget_attached_media()gets the correct paths- It is stored in the database correctly, but in the media page it is the wrong path
Maybe it is an htaccess thing?
If you require any further info let me know.
本文标签: attachmentswpgetattachmentimagesrc calling wrong location
版权声明:本文标题:attachments - wp_get_attachment_image_src calling wrong location 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749101078a2316000.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论