attachments - wp_get_attachment_image_src calling wrong location

admin2025-06-05  6

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 but get_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.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1749101105a316369.html

最新回复(0)