This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Reply To: Slider uses absolute links

#551
Jason Bobich
Keymaster

Hello,

It is not possible for the slider to use relative paths to the images. The URL’s are generated by WordPress based on your site URL. Since the URL structure of your entire website is determined virtually by WordPress permalink structure, the logic of having your slider images or any other image on your site use a relative image path wouldn’t make much sense.

For example, what if the slider did actually use relative image paths? So the slider works on your homepage, but what happens when you move the slider to a subpage? What happens when you change your permalink settings?

This basic concept is why just about everything in WordPress uses the full URL. Relative paths are not used for any assets — images, javascript, CSS files, etc.

Whether it’s your images in pages, images in your posts, or in this case, the theme’s slider images, adjusting the various places WordPress has used the site URL is just something you have to account for in working with WordPress and working with a development and live site.

There are two ways main ways people handle this:

1) Setup your virtual development environment to actually mask your live domain. — This takes some server knowledge and is a more professional solution.

2) When moving your site, just do a find/replace in your database of your production URL with your live URL. This is the most common thing people are doing as most people don’t have the resources or means to accomplish #1. This is also a popular tool people use in doing this: http://interconnectit.com/124/search-and-replace-for-wordpress-databases/

I have an article that takes you through all the steps involved in what the average person doing #2 would need to account for that you may find helpful:

http://www.jasonbobich.com/web-design/moving-wordpress-to-a-new-server/