Viewing 1 replies (of 1 total)
  • relative paths don’t work reliably in a CMS like WordPress because the same content can be called from different places ( post on a home page, same post on a single post page, same post on a category page). The relative path to the image folder can be different in some of those cases.

    If you want to use a shorter path, you could use
    <img src="/wp-content/image.jpg"
    That is not a relative path as its hard-coded to the web root of the hosting account. The domain is implied – the same one presently being accessed.

Viewing 1 replies (of 1 total)

The topic ‘relative path’ is closed to new replies.