Content Image Source URL
-
Hello and good day.
I am working on a WordPress multisite…site where in the future, after all the features and pages are done, we are going to change the url and make it live.
For example, our multisite url at the moment is…
mysite.com/blog/
But we’re going to change it later, example, like this…
mysite.com/note/
At the moment, the images that we’ve uploaded have links like
/blog/subblog/wp-content/uploads/sites/2/2014/11/name.jpg
We are worried that once we changed our site url from [blog] to [note], all the images in the posts will be broken. Because on our posts, we are posting images like this…
<img class=”alignnone size-large wp-image-441″ src=”/blog/subblog/wp-content/uploads/sites/2/2014/11/name.jpg” alt=”name” width=”650″ height=”841″ />
So my question is that is there a way for me to add a function in the functions.php wherein I can change the post images into something like this?
<?php echo network_home_url(); ?>wp-content/uploads/sites/2/2014/11/name.jpg
Thanks~
- The topic ‘Content Image Source URL’ is closed to new replies.