• Hello everyone.

    I need some help. I want to change the links to pictures on my website to it doesn’t go all the way back, it starts from a specific point.

    For example:
    I want to change:

    <img src=”https://website.com/wordpress/wp-content/uploads/2014/04/31.jpg&#8221; alt=”” />

    To:

    <img src=””uploads/2014/04/31.jpg” alt=”” />

    So basically, instead of it asking for the file from the websites, it asks for it from the wp-content directory if that makes sense.

    Thankyou for your help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • if that makes sense

    Not really. Is there a reason you want to use relative links, rather than absolute links?

    Thread Starter Szucsyyy1

    (@szucsyyy1)

    The reason is that then I don’t have to change it every time I install it somewhere else, it would make my life a lot easier. Basically what I’m trying to say is that I want it to start from wp-contects or the template directory. The template directory would be better.

    This could make sense, especially if you plan to change your website domain name in the future!

    The reason is that then I don’t have to change it every time I install it somewhere else, it would make my life a lot easier.

    Each install of WordPress is different. If you are backing up a site from one domain to another, this shouldn’t be an issue. You just need to edit the appropriate entry in your WordPress database.

    There’s an article in the Codex somewhere about this (I think), but I forget where it is. Take a look for it and I will as well when I get more time.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Changing directory’ is closed to new replies.